We help IT Professionals succeed at work.

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

tdo73 asked
Last Modified: 2013-12-25
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.
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)


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)



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")
    Set tsnew = fso.OpenTextFile (App.Path & "\TempFile.csv", ForWriting)
End If

'Write out the field names
tsnew.WriteLine strHeader

This one is on us!
(Get your first solution completely free - no credit card required)


To be completely honest, I'm have no idea if it's possible :(  I'm not very familiar with using ordinal.
This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.