Hi Everybody,
i have a "create new project wizard" in my program, which allows the users to create a new project in just three steps. My problem is, to make it simple for the user, the program should determine a new project short name in case the user didn't enter one. To do so, i go to the Projects Table and Filters for the projects that have a short name like "PROJ - *" where the * is a serial number (i.e. PROJ - 99, PROJ - 105), gets their maximum and Adds 1 to it to get the new PROJ short name.
I started by the following Query but i have an error in the Mid function.
OleDbDataAdapte r3.SelectComman d.CommandText = "SELECT Mid(PROJSHORT,6 ,6) AS Pval FROM PROJECT WHERE (PROJECT.PROJSH ORT Like '%PROJ-%')"
DsProj1.Clear()
OleDbDataAdapte r3.Fill(DsProj1 , "ProjVal")
PA = DsProj1.Tables( "ProjVal").Rows (0).Item("PVal" )
Any Help Please
i have a "create new project wizard" in my program, which allows the users to create a new project in just three steps. My problem is, to make it simple for the user, the program should determine a new project short name in case the user didn't enter one. To do so, i go to the Projects Table and Filters for the projects that have a short name like "PROJ - *" where the * is a serial number (i.e. PROJ - 99, PROJ - 105), gets their maximum and Adds 1 to it to get the new PROJ short name.
I started by the following Query but i have an error in the Mid function.
OleDbDataAdapte r3.SelectComman d.CommandText = "SELECT Mid(PROJSHORT,6 ,6) AS Pval FROM PROJECT WHERE (PROJECT.PROJSH ORT Like '%PROJ-%')"
DsProj1.Clear()
OleDbDataAdapte r3.Fill(DsProj1 , "ProjVal")
PA = DsProj1.Tables( "ProjVal").Rows (0).Item("PVal" )
Any Help Please
Comment