|
-
May 19th, 2003, 02:57 PM
#1
Thread Starter
Fanatic Member
vb to sql server
Folks,
I need to know why my code below locks up on the line
rst.Open sourcesqlstatement, cnn, adOpenStatic, adLockOptimistic
and the program says "Not Responding" in the task bar. Please help!
My boss is in another state and needs me to send him afix withinan hour. Heellp!!!!
Thank you,
Jim
Dim rst As New ADODB.Recordset
Set cnn = CreateObject("ADODB.Connection")
cnn.ConnectionString = "Driver={SQL Server};Server=SQL;Database=" & Trim(lblDatabase.Caption) & ";Uid=sa;Pwd=;"
cnn.Open
sourcesqlstatement = "Select PartName from Part where PartName <> ''"
rst.Open sourcesqlstatement, cnn, adOpenStatic, adLockOptimistic
If rst.RecordCount > 0 Then
rst.MoveFirst
While Not rst.EOF
Value = rst.Fields("PartName")
If Value = partname Then
dbAdd = False
End If
rst.MoveNext
Wend
End If
rst.Close
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|