You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a table with Primary Key on a column named ID.
CREATE TABLE [MyTest](
[ID] [integer] PRIMARY key,
[Subject] VARCHAR NOT NULL,
[Marks] [integer] NOT NULL DEFAULT 0);
I am using a class derived from CRecordset by implementing DoFieldExchange for all the 3 columns with field type as OutputColumn.
Below is code snippet used to insert new record.
The inserted row has unexpected / undesired value for ID column.
Although the recordset field member is not initialized explicitly, the record set buffer created by AddNew() operation has the max value of the int32 which gets inserted into table.
I would like the database to resolve and generate value for ID column.
How can I achieve the desired output with this ODBC driver?
for quick reference , I tried this scenario with MS Access database using Access driver and it woks as expected.
The text was updated successfully, but these errors were encountered:
I have a table with Primary Key on a column named ID.
CREATE TABLE [MyTest](
[ID] [integer] PRIMARY key,
[Subject] VARCHAR NOT NULL,
[Marks] [integer] NOT NULL DEFAULT 0);
I am using a class derived from CRecordset by implementing DoFieldExchange for all the 3 columns with field type as OutputColumn.
Below is code snippet used to insert new record.
MyTest rs(pdb);
try
{
rs.Open();
rs.AddNew();
The inserted row has unexpected / undesired value for ID column.
Although the recordset field member is not initialized explicitly, the record set buffer created by AddNew() operation has the max value of the int32 which gets inserted into table.
I would like the database to resolve and generate value for ID column.
How can I achieve the desired output with this ODBC driver?
for quick reference , I tried this scenario with MS Access database using Access driver and it woks as expected.
The text was updated successfully, but these errors were encountered: