Board index » cppbuilder » Excel problem

Excel problem


2004-08-16 05:42:16 PM
cppbuilder105
I know work with Builder 6++
The connenection with the ADO.Connection is no problem but when I run the
statement
conn.Execute("select * into authors from [ODBC;DRIVER=SQL
Server;SERVER=(SERVER);DATABASE=pubs;].[authors]");
I get the following exception : exception class EOlrException with
message'ODBC -- connection to SQL SERVER(SERVER) failed
The application doesn't run at the pc where the database are, But It is no
problem to connect with the tables through sdac6.
What could be the problem ???
Tom
 
 

Re:Excel problem

I have an excel spreadsheet with the following data fields.
UserID number
Date date
Time time
Image1 contains image
Image2 contains image
Loc Number
Reg_Number Text
This data needs to be imported into our main database. We cannot just import
all because some of the data may already exist but been entered wrongly. ( a
common error is Reg_Number) The reg S123XU May have been entered as 5123XV.
This can happen as the data is read from a written out ticket that has been
returned and processed before the PDA data has arrived.
The data from the spreadsheet has come from PDA's where there are little or
no errors.
I need to have a screen where I can compare the PDA records with similar
matches in the main database, then make a decision as to whether to create a
new record or overwrite an existing record.
On the left of the screen will show the main database filtered on a 'Match'
based on the reg number of the current record of the PDA spreadsheet on the
right of the screen. eg the reg is S123XU filter on contains S1, 123, XU,
XV, 51 etc
I cannot get the spreadsheet to display in a datagrid or datafields as I can
with a database. The spreadsheet is named Test.xls.I have created a Alias
excel1 to the file in the DBE. I have created a DNS test.dns but am unable
to 'connect' to the spreadsheet.
Any help appreciated.
 

Re:Excel problem

There is a 3rd party component for reading excel (and other data formats).
This can then be imported into a spreadhseet. I've used it and it works
very well and very quickly. The same company also supplies a set of
components for exporting data. Well worth a look and you can download
evaluation versions:
www.scalabium.com/
Support is excellent and the author is always happy to incorporate feature
requests (sometines within a day of the request).
Cheers,
Mark
"SteveW" < XXXX@XXXXX.COM >wrote in message
Quote
I have an excel spreadsheet with the following data fields.

UserID number
Date date
Time time
Image1 contains image
Image2 contains image
Loc Number
Reg_Number Text

This data needs to be imported into our main database. We cannot just
import all because some of the data may already exist but been entered
wrongly. ( a common error is Reg_Number) The reg S123XU May have been
entered as 5123XV. This can happen as the data is read from a written out
ticket that has been returned and processed before the PDA data has
arrived.
The data from the spreadsheet has come from PDA's where there are little
or no errors.

I need to have a screen where I can compare the PDA records with similar
matches in the main database, then make a decision as to whether to create
a new record or overwrite an existing record.

On the left of the screen will show the main database filtered on a
'Match' based on the reg number of the current record of the PDA
spreadsheet on the right of the screen. eg the reg is S123XU filter on
contains S1, 123, XU, XV, 51 etc

I cannot get the spreadsheet to display in a datagrid or datafields as I
can with a database. The spreadsheet is named Test.xls.I have created a
Alias excel1 to the file in the DBE. I have created a DNS test.dns but am
unable to 'connect' to the spreadsheet.


Any help appreciated.


 

{smallsort}