|
-
April 1st, 1999, 04:52 AM
#1
How to INSERT record using ExecuteSQL() Function?
I write a program such below:
....
CDatabase m_pDb;
m_pDb.Open("dbcontrol" ;
str="INSERT INTO renTable (Name,Number) VALUES ('yj',1001)";
m_pDb.ExecuteSQL(str);
....
note: renTable is a table
Name is a text field,Number is a numeric field
there is a wrong with the above program,the "insert" is unavailable,
but when
str="INSERT INTO renTable(Name) VALUES ('yj')";
m_pDb.ExecuteSQL(str);
it is available.
that is to say ,inserting "Numeric" type field have errors,also Date,Currency,etc type field except "Text"type field.
Why? How to resolve?
Thanks.
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
|