ここで私のコードはをDR.HasRows()
返しますがTrue
、 SQLManagementStudioで動作している間DR("LastID")
は戻ります。DBNUll
SELECT IDENT_CURRENT ('SiteSection') AS 'LastID'
__SQLString= "SELECT IDENT_CURRENT ('SiteSection') AS 'LastID'"
Dim DR As SqlDataReader
ddConnect() 'It's my custom class that opens a connection to db, it works
DR = ddExecuteReader()
DR.Read()
If DR.HasRows() Then
GetLastID = DR("LastID")
End If