SatishPutcha
Programmer
Hello Everybody
I am using VC++ 6.0 and trying to insert records into an Excel 2003 sheet using ODBC.
The table has been created and the ranges named but it is only inserting one record and then I am getting rhe "cannot expand named range" error.
Now when I change the range definition I am getting a "spreadsheet is full" error.
I am not sure what is going wrong and any help would be greatly appreciated.
Here is my code for inserting:
Thanks & Regards
Satish Kumar Putcha
I am using VC++ 6.0 and trying to insert records into an Excel 2003 sheet using ODBC.
The table has been created and the ranges named but it is only inserting one record and then I am getting rhe "cannot expand named range" error.
Now when I change the range definition I am getting a "spreadsheet is full" error.
I am not sure what is going wrong and any help would be greatly appreciated.
Here is my code for inserting:
Code:
CDatabase db1;
if(!db1.IsOpen())
db1.Open(NULL,FALSE,FALSE,_T("ODBC;Driver={Microsoft Excel Driver (*.xls)};DSN='';DBQ=TT_Database.XLS;ReadOnly=False"),TRUE);
strSQL1 = "INSERT INTO tbl_AllCaptured(TickerSymbol,FIELD_PRICE, FIELD_VOLUME, DateOfCapture) VALUES('GE',25.57,45,#10/10/2000#)";
db1.ExecuteSQL(strSQL1);
db1.Close();
Thanks & Regards
Satish Kumar Putcha