Hey folks,
I am trying to insert data in to an SQL Server Database.
The connection is fine but the insert fails. I am using sql below:
insert into user_group (description,btype,password,intra_user,fname,lname,login_name,email,primary_org_id,primary_g_id,image_id,knowledge_id,name,ntlogon,sql_user,private_flag,title,mobile,skills) values (‘$hrJobTitle’,u,‘$hashedData’,1,‘$hrFirstname’,‘$hrSurname’,‘$hrLoginName’,‘$hrEmailWork’,159,30,-1,-1,‘$fullName’,‘$hrLoginName’,True,False,‘$hrTitle’,‘’,‘’)
Now, the variables are string. If I use the above as it is, it inserts in to the table but the fields have data as ‘$var’ (the variable name) rahter than the data stored for the variable.
I have tried to use ‘“+$hrVariable+”’ and have tried to use ‘“$hrVariable”’ but neither work.
How should this be formatted?
Thanks folks,
Jim