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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Back-End Error 3622

Status
Not open for further replies.

fastEddied

Programmer
Joined
Nov 7, 2006
Messages
5
Location
US
Fast Eddied Not so fast on this one!"
My Access Data base and all it's forms work great as a local DB. I upsized one of my tables to sql and link to it.
When exec a form i get a---

Run-Time error "3622':
You must use the dbSeeChanges option with OpenRecordset When accessing a SQL Server table that has an IDENTITY column.

But when adding the dbSeechanges option i get a Expect array! Why i don't have a clue
Can one of you more advance programmers help me thru this?
This is my code:

Dim lngClear As Long

lngClear = 6
If checkRecordSaved = False And (OperatorText <> "" Or cmbSta1Tech <> "N/A") Then
lngClear = MsgBox("This record has not been saved. Do you want to continue?", vbYesNo)
End If
Select Case lngClear
Case 6

Reset_Fields
SOListBox.Requery


strSQL = "SELECT * FROM tbl_SchedTopQuery_for_SOListBox " & "WHERE Order_No = '" & _
Get_ShopOrder & "'"

Set rs = Application.CurrentDb.OpenRecordset(strSQL)

varSO = rs!Order_No
strSO = rs!Order_No
strCheckInProc = "SELECT * FROM TesterLog where ShopOrder = '" & strSO & "' AND In_Process_Flag = True"
Set rsCheck = Application.CurrentDb.OpenRecordset(strCheckInProc)
Set_SO = strSO
Show_ShopOrder rs, rsCheck, strSO, False

rs.Close
rsCheck.Close
Set rs = Nothing
Set rsCheck = Nothing

Case Else
Exit Sub
End Select


thanks FastEddied
 
I've sometime had problems using dao when connecting to anything that's not .mdbs

usually, when I do back end stuff, I use ado recordsets, so something along the lines of:

dim rs as new adodb.recordset
dim cn as new adodb.connection

cn.open currentproject.connection
rs.open strSql, cn

--------------------
Procrastinate Now!
 
I tried ADO now i get a command text was not set for command object. Have no clue what this means
Thanks fastEddied
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top