Link to home
Start Free TrialLog in
Avatar of tdo73
tdo73

asked on

Run time error (80040e10) for international users, but not domestic.

To give a little background, I am working on an application using VB6 with Access 2000 and ADO to connect.    The OS is XP.  My application is creating a new table from a .csv file, then using this table to populate data in another table in the database.

The issue is that my application works fine on my development machine, which is in English.  However, international users have started using the program and are experiencing problems (specifically, Portugese and Turkish users).  It's been tough to gather information but the error message is

Run-time error -2147217904(80040e10)
missing one or more  necessary parameters

Here is the snippet of code that is causing problems.  The error message seems to be thrown at the SQL DELETE statement.  This is a tough one to debug and fix since on my development machine, everything works fine.

Dim con As New ADODB.Connection
con.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Records.mdb"

con.Execute "DROP table TempTable"
con.Execute "SELECT * INTO [TempTable] FROM [TEXT;DATABASE=" & App.Path & "].[TempFile.csv]"
'The purpose of the DELETE is to ensure that no existing records are overwritten.  The 3 TempTable fields
'are combined to match the format of the [Recs].[IDNo] field, which is "xx-xx-xxxx"
con.Execute "DELETE TempTable.* FROM [TempTable] INNER JOIN [Recs] ON [TempTable].[Expr1] & '-' & [TempTable].[Expr2] & '-' & [TempTable].[Expr3] = [Recs].[IDNo]"

Any help would be greatly appreciated.  I'm having a difficult time with this one.
ASKER CERTIFIED SOLUTION
Avatar of cookre
cookre
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tdo73
tdo73

ASKER

I suppose that it's possible, I'll have to contact the users.  The .csv file (including headers) is created in a different part of the application.  I'm not sure if the DB field names would differ when the .csv file is created on an international PC as opposed to a domestic one.

I'm not sure if building a non-English test box is feasible, but it's something at some point I may have to consider.
Use Log File/Debug window to extract the exact test of this line :

"DELETE TempTable.* FROM [TempTable] INNER JOIN [Recs] ON [TempTable].[Expr1] & '-' & [TempTable].[Expr2] & '-' & [TempTable].[Expr3] = [Recs].[IDNo]"

You are likely to see strange characters which are breaking up your string (as cookre suggested)

Leon
Avatar of tdo73

ASKER

To follow up with the point of the DB field names being screwed up; the .csv file that I am importing is created by another part of the application.  The field names for this file are stored in VB.  Is it possible that when I write these out to the .csv file on an international PC, strange characters are being inserted?  Or is that not a possibility?  I'm confused on how VB handles that.

For example:

Dim fso As New FileSystemObject
Dim tsnew As TextStream
strHeader = "Expr1, Expr2, Expr3, NAME, ADDR_1,ADDR_2"

If Not fso.FileExists(App.Path & "\TempFile.csv") Then
    Set tsnew = fso.CreateTextFile(App.Path & "\TempFile.csv")
Else
    Set tsnew = fso.OpenTextFile (App.Path & "\TempFile.csv", ForWriting)
End If

'Write out the field names
tsnew.WriteLine strHeader

tsnew.Close
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tdo73

ASKER

To be completely honest, I'm have no idea if it's possible :(  I'm not very familiar with using ordinal.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial