How can I add this text record (what includes the ' sign) to a table via ODBC (SQL Server 6.0) :
Field Name :
Names (varchar)
Value: eg.
'Laci' vagy 'Maci'
Laszlo Sera
Printable View
How can I add this text record (what includes the ' sign) to a table via ODBC (SQL Server 6.0) :
Field Name :
Names (varchar)
Value: eg.
'Laci' vagy 'Maci'
Laszlo Sera
1. Create ODBC Datasource and connect with your sql server database
2. TAke an instance of CDatabase MFC Class and call Open method of CDatabase with datasource parameter
3. Call ExecuteSQL method of CDatabase with INSERT .. INTO query
If you are building your SQL string in code you must remember that the apostrophe ( ' ) is a delimiter
in SQL. to use the string 'Laci' vagy 'Maci' in SQL you must replace each apostrophe with two
apostrophes. ''Laci'' vagy ''Maci''. Note: these are two apostrophes not a quote.