• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Using Excel via ODBC

MyUserName

Super poster
Joined
Jan 19, 2012
Messages
4,571
Likes received
467
Thanks received
110
Location
Oh ... not far
I create a table with numeric columns but do not put data in it via ODBC.
When I read it back the comes back as a varchar because it is unable to tell the data type without data.

Is there any way around this, can you create the columns with some kind of tag etc?
 
I need to create the table in one statement and write to it later, closing the connection inbetween.

My problem is that our system reads the database metadata and because the column is empty Excel returns the metadata as a varchar rather than as a numeric (which is how it was created). Our date is numeric, the metadata is varchar and we get an error.

I am not able to change the code base which does that check as it is very deep inside legacy code.

I was hoping there was some kind of tag I could create the column with so it knows for later that it is numeric?
 
IIRC the ini file didn't require code change - an ini with the same name as the xls and it processes automagically
 
What database are you using?

All sounds a bit rinky dink if you're using Excel as some sort of ETL device.
 
What database are you using?

All sounds a bit rinky dink if you're using Excel as some sort of ETL device.

I am writing an ODBC driver for our product and someone wants to use Excel.
 
I am writing an ODBC driver for our product and someone wants to use Excel.

My condolences :hug:

Is this to push something to Excel or for Excel to pull from your product?
 

Advertisers

Back
Top