Hi,

I am new here so I will first introduce myself a bit. I have been programming for quite some time now (6 years professionally), but never used database that much. Even though my first job was actually for a company that has a database on the market. But working ON one is quite different from working WITH one! ;)

So, recently my new job required the introduction of a database into our solution. So, we decided on MS SQL Server and as hardcore C++ programmers we needed a C++ interface. ADO is what we use now. To start I build a tool to import data from our glorious flat files :eek: into the database. It works fine, except that I keep getting the same error on executing verious queries:

First-chance exception in DatabaseImport.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
SQL used:
EXEC MY_STORED_POCEDURE @ID = 3463, @ID2 = 3986, @CL_TIMESTAMP = '2004-03-31 10:55:06'

ADO database error detected:
Number: -2147467259
Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Source: Microsoft OLE DB Provider for SQL Server
HelpFile:
HelpContext: 0
SQLState: 08001
NativeError: 17

Other errors I see:

ADO database error detected:
Number: -2147467259
Description: Timeout expired
Source: Microsoft OLE DB Provider for SQL Server
HelpFile:
HelpContext: 0
SQLState: HYT00
NativeError: 0

And:

ADO database error detected:
Number: -2147217887
Description: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Source: Microsoft OLE DB Provider for SQL Server
HelpFile:
HelpContext: 0
SQLState:
NativeError: 0

I have a work around which basically tries to execute the query a maximum of 10 times and it always seems to be enough. So, the query is good and eventually it goes through. But because of the errors, it is slow and let's face it, it is better to not have them. ;)

So, if anyone can help me, it would be most appreciated...

Many thanks,
Radboud