By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,424 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,424 IT Pros & Developers. It's quick & easy.

odbc parameter missing source column???

P: n/a
Hi group,

I have an app that accesses an Access DB. We are using odbc because this
app will probably be using other databases as well dependiing on the clients
needs.

Consider the following;

OdbcParameter prmID = new OdbcParameter("ID", OdbcType.Text);//ID column is
Primary Key
prmID.SourceColumn =
myStronglyTypedDataset.RecordsTable.IDColumn.Colum nName;// ds created using
drag/drop from Server explorer in vs2003
myDataAdapter.Add(prmID);
myDataAdapter.MissingMappingAction = MissingMappingAction.Ignore;//I use
this to get a less 'generic' error or else I get "Restricted Data Access
Violation" error from ODBC - Access driver ???
myDataAdapter.Update(myStronglyTypedDataset.Record sTable);

This gives me
My Access Database column is of Type Text(50)
myStronglyTypedDataset.RecordsTable.Rows[0] holds "asdf-ghjk-qwer-tyui";

For some reason I get a "Missing SourceColumn Mapping for 'ID'" error. I've
checked and double checked. My parameters' source column is set properly
inside my parameter and my table has valid data. Since this is ODBC i
thought maybe the mapping types didn't match Access's so I tried using
another type of ODBCTypeText, .Varchar, I even tried DBType.String but to no
avail.

Does anybody have any ideas of what might be causing this? Could it be an
Access 2000 problem? ODBC? Any help would be appreciated.

Regards,

Marco

Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.