Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Insert this!

Author  Topic 

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-11-17 : 10:31:54
I have come across a strange problem that I am now completely stuck on and so would appreciate ANY ideas or suggestions.

I have a small Access (97!) app that has been running fine for a while. I needed to perform some maintenance on it so decided to move the data onto a SQL server and link the tables through using ODBC which works fine for our main app so I thought it would all be fine!

I've linked the tables through to Access and can enter data directly into them. BUT the app itself uses a subform for some of the data entry.

In this subform I can no longer insert a record, the main form is fine, I have the allow additions option on. I don't really know what else to try.

Any help would be very gratefully appreciated

thanks

steve

-----------

Facts are meaningless. You could use facts to prove anything that's even remotely true!

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2005-11-17 : 11:11:51
Does a primary key exist in SQL server for the related table? access->sql needs a PK in SQL to enable any db work.


see...http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=57840
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-11-17 : 11:18:23
Maybe you could change your subform to insert the new row with a stored procedure call.




CODO ERGO SUM
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-11-18 : 03:33:27
quote:
Does a primary key exist in SQL server for the related table? access->sql needs a PK in SQL to enable any db work.


I *thought* there was, have to go and check

quote:
Maybe you could change your subform to insert the new row with a stored procedure call.


This is an ideal, but time is very limited. Mind you - I have spent so much time messing about with this that I could have gone that way.

Many thanks guys

steve

-----------

Facts are meaningless. You could use facts to prove anything that's even remotely true!
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-11-21 : 03:55:00
This is really freaking me out now! There are only three tables and it turned out that one of them didn't have a PK set (an oversight). So thinks me - here is the solution. So I set it and No Change in the app. So we decide we are going to go with the SP solution. When I am working out the details for that the thing seems to have started working again!! Ghost in the machine methinks

Thanks again for your suggestions guys

steve

-----------

Facts are meaningless. You could use facts to prove anything that's even remotely true!
Go to Top of Page
   

- Advertisement -