|
-
April 23rd, 1999, 01:39 PM
#1
[ODBC] How to INSERT text record
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
-
April 23rd, 1999, 02:15 PM
#2
Re: [ODBC] How to INSERT text record
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
-
April 23rd, 1999, 02:56 PM
#3
Re: [ODBC] How to INSERT text record
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|