
Indefinite hang after making ODBC connection to sqlserver6.5 using VB5
I am new to using sql server, and having problems. My surrent problem
is that after I make an ODBC connection to the sqlserver using the code
below, the application then either hangs indefinitely or tells me that
I am out of stack space.
If it hangs, it never gets past making the odbc connection; I'm not sure
how far it gets before running out of stack space (it always hangs when
I step thru it using the de{*filter*}).
I don't think that the rest of the code has too many nested function
calls (how many is too
many, anyway?), and there are no recursive calls, so I'm not sure where
to look to fix the stack space thing when I can consistently get there.
Any pointers on what I am doing wrong, or what I should be looking for?
Thanks!
Jeri
Dim ssql As String
Set db = OpenDatabase("thesePubs", False, False, "ODBC")
ssql = "Select distinctrow titles.*, publishers.* from publishers
inner join titles on publishers.pub_id = titles.pub_id order by
titles.Title;"
Set rs = db.OpenRecordset(ssql)
If rs.EOF And rs.BOF Then
rs.AddNew
rs.Update
totrec = 1
Else
rs.MoveLast
totrec = rs.RecordCount
End If