Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to SQL Server question

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
GB
Hi

I have an Access database table called Table1 that contains 2 fields . An ID Autonumber field and a boolean "Yes/No" field.

I then used the upsizing wizard to add this table to SQL Server 2005 Express.

I then create a Borland program with :

ADOConnection1 pointing to SQL Server
ADOTable1 pointing to Table1
DataSource1 pointing to ADOTable1
DBGrid1 pointing to DataSource1
DBNavigator1 pointing to DataSource1

Fired it up and it is fine. I can add , delete , update records from True to False and back again no problem.

I then point the ADOConnection1 to the Access database which now contains a linked table to the SQL Server and re-re-run the code.

I can add a record OK , but if I try and update a record I get "Row cannot be located for updating..."

Yet if I do the same thing through the Access front end it works fine, it's just the Borland stuff it doesn't like. Same thing happens if I use a DBCheckBox control.

Any ideas ? Anyone come across this .

Table1 fields:

ID - AutoNumber and Primary Key
Test = type Yes/No with no default set ( tried with having a default set but same thing happens )

The above is merely an example to prove my point. I have a huge project to convert and I have done it all except for this quirk. I want to "talk" through the Access database to the SQL Server cos there are 100+ queries already set up that I don't want to have to convert etc

Any help / pointers woudl be appreciated.






Hope this helps!

Regards

BuilderSpec
 
Another point to mention I forgot..

The borland front end will let me add a value of either true or false.

I can update a value from false to true .

It is when I am updating a value from true to false that the error occurs.



Hope this helps!

Regards

BuilderSpec
 
I can add a record OK , but if I try and update a record I get "Row cannot be located for updating..."
It is when I am updating a value from true to false that the error occurs.

Show us the code on how you are attempting to do this. My programs add and update SQL tables via ADO but I must admit, I don't deal with Access.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top