Dear Team,
I am facing issue in compiling VB6 project.
A small piece of project (earlier developed in windows xp/7 32 bit, windows 2k server, sql2k db) is shipped to some other infrastructor (Windows 2016 server, sql 2008 server, user in windows 7 sp1). The code is perfectly running in earlier infrastructure.
As a new requirement at another location/infrastructure, we shipped this project. After installation of VB6, SP6 and copied the source code, while compiling the project it throws couple of component errors which somehow resolved. But, now under 'Microsoft Visual Basic' title, Compile Error, 'Method Or Data Member not found' message showing in login form code page. The below is the code for reference -
------------------------
Private Sub cmdLogin_Click()
Dim strSql As String, StrResult As String
Static intCtr As Integer
If intCtr = 0 Then
intCtr = 1
Else
intCtr = intCtr + 1
End If
strSql = "Select * From UserMaster as UM Where um.UserName='" & Trim(Txtusername.Text) & "' "
strSql = strSql & " And um.Password='" & Trim(txtPassword.Text) & "'"
strSql = strSql & " And um.ModuleUse like '%" & mstrApplicationName & "%'"
With mrsLogin
If .State = adStateClosed Then
.Open strSql, Conn, adOpenDynamic, adLockOptimistic
End If
If .EOF Then
Call subInCorrectLogin
StrResult = MsgBox("Invalid UserName or Password.", vbRetryCancel, "Export Application Error Message:")
If StrResult = vbCancel Then
.Close
Set mrsLogin = Nothing
Unload Me
Exit Sub
Else
If intCtr < 3 Then
Txtusername.SetFocus
.Close
Set mrsLogin = Nothing
Txtusername.SetFocus
Exit Sub
Else
MsgBox "Sorry ! Terminating session.", vbInformation, "Export Application Error Message:"
mbolLogin = False
If .State = adStateOpen Then
.Close
Set mrsLogin = Nothing
End If
Unload Me
Exit Sub
End If
End If
Else
Call subCorrectLogin
mstrUserName = Trim$(Txtusername.Text)
MSTRUID = .Fields("UID")
mCanUseModule = .Fields("ModuleUse")
mCanUseForms = .Fields("CanUseForm")
mbolLogin = True
Unload Me
End If
End With
mrsLogin.Close
If mrsLogin.State = adStateOpen Then
mrsLogin.Close
Set mrsLogin = Nothing
End If
If mbolLogin = True Then
Load frmMain
Call GetAcYearInfo
frmMain.Show
frmMain.StbMain.Panels(4).Text = "User : " & mstrUserName //////////(The compiling error showing on this line at .panels)
frmMain.StbMain.Panels(5).Text = "Uid : " & MSTRUID
End If
End Sub
------------------------
As i am not in touch with VB6 coding since long, not able to resolve since couple of hours. Can someone help me to resolve the issue.
Thanks in advance...
I am facing issue in compiling VB6 project.
A small piece of project (earlier developed in windows xp/7 32 bit, windows 2k server, sql2k db) is shipped to some other infrastructor (Windows 2016 server, sql 2008 server, user in windows 7 sp1). The code is perfectly running in earlier infrastructure.
As a new requirement at another location/infrastructure, we shipped this project. After installation of VB6, SP6 and copied the source code, while compiling the project it throws couple of component errors which somehow resolved. But, now under 'Microsoft Visual Basic' title, Compile Error, 'Method Or Data Member not found' message showing in login form code page. The below is the code for reference -
------------------------
Private Sub cmdLogin_Click()
Dim strSql As String, StrResult As String
Static intCtr As Integer
If intCtr = 0 Then
intCtr = 1
Else
intCtr = intCtr + 1
End If
strSql = "Select * From UserMaster as UM Where um.UserName='" & Trim(Txtusername.Text) & "' "
strSql = strSql & " And um.Password='" & Trim(txtPassword.Text) & "'"
strSql = strSql & " And um.ModuleUse like '%" & mstrApplicationName & "%'"
With mrsLogin
If .State = adStateClosed Then
.Open strSql, Conn, adOpenDynamic, adLockOptimistic
End If
If .EOF Then
Call subInCorrectLogin
StrResult = MsgBox("Invalid UserName or Password.", vbRetryCancel, "Export Application Error Message:")
If StrResult = vbCancel Then
.Close
Set mrsLogin = Nothing
Unload Me
Exit Sub
Else
If intCtr < 3 Then
Txtusername.SetFocus
.Close
Set mrsLogin = Nothing
Txtusername.SetFocus
Exit Sub
Else
MsgBox "Sorry ! Terminating session.", vbInformation, "Export Application Error Message:"
mbolLogin = False
If .State = adStateOpen Then
.Close
Set mrsLogin = Nothing
End If
Unload Me
Exit Sub
End If
End If
Else
Call subCorrectLogin
mstrUserName = Trim$(Txtusername.Text)
MSTRUID = .Fields("UID")
mCanUseModule = .Fields("ModuleUse")
mCanUseForms = .Fields("CanUseForm")
mbolLogin = True
Unload Me
End If
End With
mrsLogin.Close
If mrsLogin.State = adStateOpen Then
mrsLogin.Close
Set mrsLogin = Nothing
End If
If mbolLogin = True Then
Load frmMain
Call GetAcYearInfo
frmMain.Show
frmMain.StbMain.Panels(4).Text = "User : " & mstrUserName //////////(The compiling error showing on this line at .panels)
frmMain.StbMain.Panels(5).Text = "Uid : " & MSTRUID
End If
End Sub
------------------------
As i am not in touch with VB6 coding since long, not able to resolve since couple of hours. Can someone help me to resolve the issue.
Thanks in advance...