Quantcast
Channel: VBForums - Database Development
Viewing all articles
Browse latest Browse all 2918

Issue with finding records on a table direct

$
0
0
I'm converting an old VB6 program to use SQL Server from MS Access. In Jet we can use .Index and .Seek to find a record based on the primary key.

With OpenTable
.ActiveConnection = DB
.Source = TableName
.CursorLocation = adUseServer
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open Options:=adCmdTableDirect
End With

If Not NoParams Then
If DbIs <> "SQLServer" Then
OpenTable.Index = PK
OpenTable.Seek PK1, adSeekFirstEQ
Else
'???????
End If

TableOpen = True
End If


How do you do the same thing with SQL Server?

Viewing all articles
Browse latest Browse all 2918

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>