tags:

views:

338

answers:

2

Hi,

I am trying to perform a database operation from a VB 6.0 application (connecting to SQL 2000). The application is running fine in my local and test machines, but it gives the following error in the UAT environment.

dbConn - Nothing
lErrorNum = -2147024770
sErrorDesc = Method '~' of object '~' failed

My source code is:

Dim connectionString As String
connectionString = "DSN = {My DSN Name}"
Private dbConn As ADODB.Connection
Set dbConn = New ADODB.Connection
With dbConn
    .ConnectionString = sConn
    .ConnectionTimeout = 10             
    .CursorLocation = adUseClient       
    .CommandTimeout = 60
    .Open
End With

The MDAC version is MDAC 2.8 SP2 ON WINDOWS SERVER 2003 SP1. (Check with CompChecker)

I have copied the source code to the UAT environment and tried running it from the IDE, but still the same error.

A: 

The error code is a Win32 facility error, 123 ERROR_INVALID_NAME: The file, directory name, or volume label syntax is incorrect.

Sounds like ADO isn't installed correctly.

AnthonyWJones
A: 

One possibility is that you need to install the MS SQL Client tools on the UAT server (http://msdn.microsoft.com/en-us/library/aa197918%28SQL.80%29.aspx). Have you checked the DSN itself using the test connection option? You could also try an DSN-less connection string.

tijmenvdk