CRecordset updateable join with SQL Server 7.0 
Author Message
 CRecordset updateable join with SQL Server 7.0

Hi,

If I update a column 64 times on a joined table with the same raw, I receive
the following error:
"Invalid cursor position", "State:S1109,Native:0,Origin:[Microsoft][ODBC SQL
Server Driver]"
It is not possible to update this joined table raw again. After the magic 64
joined updates every table for his own can be updated as long as you want.
Each other raw in the joined table can also be updated well, but only less
then 64 times.
The environment in which the error occurred is the SQL Server 7.00.835 SP2
on NT 4.0 SP6 with ODBC 3.70.08.20 and the following code was compiled with
VC++ 6.0 SP3.

CMyRecordset db;
db.m_DefaultConnect = "ODBC;DSN=Blutbank;UID=sa;PWD=";
db.m_DefaultSQL = "PATSTAMM join UNIQUECROSSJOIN on PATSTAMM.NR =
UNIQUECROSSJOIN.NR join A_BLUT on PATSTAMM.NR = A_BLUT.NR and
UNIQUECROSSJOIN.LNR =  A_BLUT.JNR";
db.Open(CRecordset::dynaset);
for(int i=0; i < 1000; i++)
{
CString cs; cs.Format("%d", i);
 db.Requery();
 db.m_bAppendable = db.m_bUpdatable = TRUE;
 db.Edit();
 db.TestNr = cs;  // varchar (10) column in A_BLUT
 db.Update();

Quote:
}

The same code on the same environment with SQL Server 6.5 SP5a works well
without a problem.

Thanks,
K.H.Mali



Fri, 09 Aug 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Perform SQL statement in VC++ against MS SQL Server 7.0

2. SQL Server with CDatabase/CRecordset and server cursors

3. CRecordset and SQL Server Linked Server View

4. Joining two tables from SQL server in Visual C++ 6

5. row level locking under VC++/MFC/CRecordset and ODBC with SQL 7.0

6. Q: Why CRecordset cannot work well with SQL 7.0

7. Preserving writable server cursor after rollback (7.0, vc++, CDatabase/CRecordset)

8. Keeping Cursor Open After a RollBack (MFC,ODBC,SQL Server 7.0)

9. HELP !!!! Developing a provider for SQL-Server 7.0

10. Using DAO with MS SQL Server 7.0

11. FS: "Professional SQL Server 7.0 Programming"

12. sysindexes problem in ADO with SQL Server 7.0

 

 
Powered by phpBB® Forum Software