shankarpatil
Programmer
VB6,CR8,DB2 on AS400
I am using the following the code to connect to DB2 database thru VB6. When the propReport.SQLQueryString is executed the log-on dialog box is prompted for user-id and password.All the information is passed thru the SetLogOnInfo and the LogOnServer methods. Is there something wrong with the code or am I missing something.How do I suppress the log-on dialog box.
Dim tbl As CRAXDRT.DatabaseTable
Dim propReport As CRAXDRT.Report
Screen.MousePointer = vbHourglass
For Each tbl In propReport.Database.Tables
tbl.SetLogOnInfo g_DsnName, g_DsnName, g_UserId, g_Password
Next
propReport.Database.LogOnServer "pdsodbc.dll", g_DsnName,
g_DsnName, g_UserId, g_Password
propReport.SQLQueryString = propSQLString
propReport.FormulaFields(4).Text = "'" & UCase(Trim(propNetwork)) & "'"
CRViewer1.ReportSource = propReport
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
I am using the following the code to connect to DB2 database thru VB6. When the propReport.SQLQueryString is executed the log-on dialog box is prompted for user-id and password.All the information is passed thru the SetLogOnInfo and the LogOnServer methods. Is there something wrong with the code or am I missing something.How do I suppress the log-on dialog box.
Dim tbl As CRAXDRT.DatabaseTable
Dim propReport As CRAXDRT.Report
Screen.MousePointer = vbHourglass
For Each tbl In propReport.Database.Tables
tbl.SetLogOnInfo g_DsnName, g_DsnName, g_UserId, g_Password
Next
propReport.Database.LogOnServer "pdsodbc.dll", g_DsnName,
g_DsnName, g_UserId, g_Password
propReport.SQLQueryString = propSQLString
propReport.FormulaFields(4).Text = "'" & UCase(Trim(propNetwork)) & "'"
CRViewer1.ReportSource = propReport
CRViewer1.ViewReport
Screen.MousePointer = vbDefault