Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

Invalid Data Element Key

$
0
0
I haven't worked in VB in years but I've using VB6 to parse file data into an Access database. The problem is that I keep getting an error message on the 4th field of every line and ONLY on the 4th field. All other fields go into the Access tables without a problem

The error message is: Run-time error '12246'; [DESCRIPTION: Invalid data element key][CODE:12246]

So table 1 could consist of FirstName; LastName; ZipCode; DateOfBirth(date)
table 2 could consist of Customer ID; StartDate; EndDate; Amount(int)
table 3 could consist of Customer ID; DOB; FirstName; LastName(txt); MiddleName

The DOB in table 1, the Amount in table 2 and the LastName of table 3 will get the error msg. Comment those fields out and everything runs. I don't need that particular piece of data in 4 of the 7 Access tables but other 3 have critical data in that field. I've tried the code on 2 machines with the same results. I've 'copied and paste' the field names to eliminate spelling errors. I couldn't find anything on the error code. Could I have set 'something' accidentlly? I'm pretty lost here.

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>