ADO and identity field problem.

Results 1 to 2 of 2

Thread: ADO and identity field problem.

  1. #1
    Bill E. Guest

    Default ADO and identity field problem.

    Here is some code that we have running on our server here. On this server we are running win2k, mdac2.5 and it works just fine.<BR><BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en "Whatever","sa",""<BR>sql = "Select * from Whatever: <BR>Set rs = Server.CreateObject("ADODB.Recordset") <BR>rs.Open sql, conn, 1, 3, 32 &#039adOpenKeyset, adLockOptimistic, adAsyncFetch<BR><BR> If rs.eof Then<BR> rs.addnew <BR> rs("whatever") = whatever<BR> rs.update<BR> identityfield = rs("identityfield")<BR> session("identityfield") = identityfield<BR> End If <BR> rs.close <BR><BR>Though the problem is that we are setting up a remote server with this application and it isn&#039t working now. Though the remote situation now has the application on one server and the database on another. The application server is running win2k and mdac2.6 and the database server is running nt4(with latest sp) and mdac2.5. We keep getting the error on the update probably because it is not recognizing the adasynchfetch. Any ideas out there?<BR><BR>Thank you in advance.<BR><BR>bill e.

  2. #2
    Bill E. Guest

    Default RE: ADO and identity field problem.

    Figured it out. When you export the sql database, you need to also set it up to copy over all the primary keys as well. That is it.<BR><BR>Bill E.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts