I am trying to return a recordset and I get the error:
"This program has performed an illegal operation and will be shut down.
If the problem persiss, contact the program vendor", then Visual Basic 6 crashes and I have to reload.
On occasion, when I reload VB I ge the following error:
"An unexpected error has occured!"
Error Number 462
The remote server machine does not exist or is unavailable."
Has anyone heard of this happening before? Below you will find my code, thanks in advance for any help!
Dim rsLvSec As ADODB.Recordset
Set rsLvSec = New ADODB.Recordset
Dim sSql As String
'sSql = "SELECT SY0MNU_MenuFile.ApplicationCode, SY1MNU_MenuCrossReference.TaskNumber, SY1MNU_MenuCrossReference.Description FROM SY1MNU_MenuCrossReference WHERE SY1MNU_MenuCrossReference.Module = SY0MNU_MenuFile.ApplicationCode ORDER BY SY1MNU_MenuCrossReference.TaskNumber"
Dim NodeAdo As ADODB.Connection
Set NodeAdo = New ADODB.Connection
Dim sConnect As String
sConnect = "Provider=MSDASQL.1;Extended Properties='DSN=SOTAMAS90;CacheSize=4;DirtyReads=1;BurstMode=1;SERVER=NotTheServer'"
'sSql = "SELECT SY1MNU_MenuCrossReference.TaskNumber, SY1MNU_MenuCrossReference.Description, SY1MNU_MenuCrossReference.ProgramName, SY1MNU_MenuCrossReference.Module, SY1MNU_MenuCrossReference.MenuNumber, SY1MNU_MenuCrossReference.OptionNumber, SY0MNU_MenuFile.ApplicationCode, SY0MNU_MenuFile.RecordType From SY0MNU_MenuFile, SY1MNU_MenuCrossReference WHERE SY1MNU_MenuCrossReference.Module=SY0MNU_MenuFile.ApplicationCode"
sSql = "SELECT SY0SEC_SystemSecurityFile.UserCode, SY0SEC_SystemSecurityFile.UserName, SY0SEC_SystemSecurityFile.GroupCode "
sSql = sSql + "From SY0SEC_SystemSecurityFile "
sSql = sSql + "WHERE SY0SEC_SystemSecurityFile.UserName like '%%%%" + Nodeclicked + "'"
MsgBox sSql
NodeAdo.Open sConnect
rsLvSec.Open sSql, NodeAdo, adOpenDynamic, adLockOptimistic
'Dim ixx As String
'ixx = rsLvSec
Dim Bob As String
'rsLvSec
'rsLvSec.MoveLast
'rsLvSec.MoveFirst
Bob = rsLvSec(0)
MsgBox Bob
end sub
Thanks,
Bob
