Click to See Complete Forum and Search --> : [ODBC] How to INSERT text record
Laszlo Sera
April 23rd, 1999, 01:39 PM
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
maheshbeniwal
April 23rd, 1999, 02:15 PM
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
Gary Grant
April 23rd, 1999, 02:56 PM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.