Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert into SQL with a '
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Insert into SQL with a '
Miscellaneous
Thread ID:
01670208
Message ID:
01670208
Views:
74
hi all,
I'm trying to insert (and update) into an SQL Server table but I get an error when a name contains a ' e.g. Michael O'Reilly
The code in summary is below, I've also tried variations of &lcName, (lcName) etc. but no joy
lcSQLcommand = "INSERT into Contacts (" + ;
			"Contact_Name " + ;
			")" + ;
		"Values (" + ;
			" '" + lcName + "'" + ;
			")"

SQLEXEC(lnSQLHandler, lcSQLcommand)
~M
Go raibh maith agat

~M
Next
Reply
Map
View

Click here to load this message in the networking platform