asingh
08-07-2005, 05:25 AM
Hi ,
I have two excel sheets....and I am transferring data from the master excel sheet to a data base excel sheet [which is a closed sheet] using SQL..embeded as VBA code. The data is reaching the data base sheet fine..but the problem I am facing that, when I open the data base sheet, all the data is showing up as string literals. For example if I send the data 3.23 via sql to the data base sheet...I see the data as '3.23 in the data base sheet. All data points in the data sheet have an apostrophe in front of them. Even if the data is defined as decimal data type in the master sheet..it is still showing up as string literals in the data base sheet. The SQL syntax that I am using is:
rstworkbook.Open strSQL, connectString
Where rstworkbook is an object, strSQL is the sql command line, and connectString is the string with the connection properties for the data base sheet.
strSQL = INSERT INTO [userdata$] ([Credits]) VALUES '" & xCrdts "'
xCrdts is a variable defined as single or double in the master sheet.
I have two excel sheets....and I am transferring data from the master excel sheet to a data base excel sheet [which is a closed sheet] using SQL..embeded as VBA code. The data is reaching the data base sheet fine..but the problem I am facing that, when I open the data base sheet, all the data is showing up as string literals. For example if I send the data 3.23 via sql to the data base sheet...I see the data as '3.23 in the data base sheet. All data points in the data sheet have an apostrophe in front of them. Even if the data is defined as decimal data type in the master sheet..it is still showing up as string literals in the data base sheet. The SQL syntax that I am using is:
rstworkbook.Open strSQL, connectString
Where rstworkbook is an object, strSQL is the sql command line, and connectString is the string with the connection properties for the data base sheet.
strSQL = INSERT INTO [userdata$] ([Credits]) VALUES '" & xCrdts "'
xCrdts is a variable defined as single or double in the master sheet.