![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
On Aug 25, 7:43 am, "Bob Barrows" <reb01... (AT) NOyahooSPAM (DOT) com> wrote: Bob Barrows wrote: sSQL="SELECT handoverId,lineNbr " & _ "FROM tblSlsDetail WHERE 1 = 2" Of course, you should substitute the actual name of the table in sql server rather than using the name of the linked table (if different). in this case the original error message is misleading and incorrect I debug.printed all the fields in the recordset and tried to create the record manually turns out one of the actual fields that I was updating has a foreign key to a product table, and it was missing a record the manual entry gave me the correct error message, and I fixed the data |
#12
| |||
| |||
|
|
as to an insert statement, it's a idea, but the example I've provided highly simplifies the fields that are updated - actually there are many fields and the contents is sometimes based on conditions - but I'll look into an INSERT |
#13
| |||
| |||
|
|
I would expect he wants to open an empty recordset with the intention of doing nothing but add new records. Of course, executing a sql INSERT statement directly would be a better plan. |
#14
| |||
| |||
|
|
the ADO version worked fine until yesterday we are in the process of updating from office2007 to office2010, except for access which will stay at 2007 when we did the update on the development server, this MDB failed with an ADO issue looks like the msado15.dll was updated by the office2010 update to a version incompatible with access2007 |
#15
| |||
| |||
|
|
On Aug 25, 7:43*am, "Bob Barrows" <reb01... (AT) NOyahooSPAM (DOT) com> wrote: Bob Barrows wrote: sSQL="SELECT handoverId,lineNbr *" & _ "FROM tblSlsDetail WHERE 1 = 2" Of course, you should substitute the actual name of the table in sql server rather than using the name of the linked table (if different). in this case the original error message is misleading and incorrect I debug.printed all the fields in the recordset and tried to create the record manually turns out one of the actual fields that I was updating has a foreign key to a product table, and it was missing a record the manual entry gave me the correct error message, and I fixed the data |
![]() |
| Thread Tools | |
| Display Modes | |
| |