We have succesfully set up the compiler and development environment but are running into a problem passing a parameter to a procedure. I created a test procedure with the same code and but with out the parameter and it worked fine. The error is
"No error information available: DB_E_NOCOMMAND(0x80040E0C)."

Also, what is the "Specific Name" of the stored procedure. Would it be possible to omit it (there is a maximum of 18 charachters, and our current naming system has many procedures with longer)?


here is the asp page code, the procedure call is encapsulated in ***** (asteriks)
**********************************************
'COPYRIGHT 2002-2003 (c) LABTrack, LLC. All Rights Reserved

Option Explicit On
Option Strict On

Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Security
Imports System.Security
Imports System.Security.Cryptography
Imports System.IO
Imports System.Text

Public Class _Login
Inherits System.Web.UI.Page
Protected WithEvents lblLabTrackLogin As System.Web.UI.WebControls.Label
Protected WithEvents txtUserID As System.Web.UI.WebControls.TextBox
Protected WithEvents ReqValtxtUserID As System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents lblUserID As System.Web.UI.WebControls.Label
Protected WithEvents lblMessage As System.Web.UI.WebControls.Label
Protected WithEvents lblMessageOut As System.Web.UI.WebControls.Label
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
Protected WithEvents lblPW As System.Web.UI.WebControls.Label
Protected WithEvents txtPW As System.Web.UI.WebControls.TextBox
Protected WithEvents ReqValtxtPW As System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents ReqValtxtPW1 As System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents btnLogin As System.Web.UI.HtmlControls.HtmlInputButton

'IF SQL SERVER DB, UNCOMMENT THE FOLLOWING, COMMENT BELOW
'Private objConnect As SqlConnection
'Private objCommand As SqlCommand
'Private objDataReader As SqlDataReader
'Private objConnect2 As SqlConnection
'Private objCommand2 As SqlCommand

'IF NON-SQL SERVER DB, UNCOMMENT THE FOLLOWING, COMMENT ABOVE
Private objConnect As OleDb.OleDbConnection
Private objCommand As OleDb.OleDbCommand
Private objDataReader As OleDb.OleDbDataReader
Private objConnect2 As OleDb.OleDbConnection
Private objCommand2 As OleDb.OleDbCommand

Dim strOldDBSetupHash As String
Dim strNewDBSetupHash As String

Dim strCommandText As String
Dim strProcName As String
Dim intRowsAffected As Integer = 0
#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()

If CStr(Application("DBType")) = "SQLServer" Then
'objConnect = New SqlConnection(CStr(Application("LabTrack_Connectio nString")))
'objCommand = New SqlCommand()
Else 'DB2
objConnect = New OleDb.OleDbConnection(CStr(Application("LabTrack_C onnectionString")))
objCommand = New OleDb.OleDbCommand()
End If

objCommand.CommandType = CommandType.StoredProcedure
objCommand.Connection = objConnect
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'If session has been terminated for some reason (SessionID is missing), try to logoff gracefully.
' If session variable lost, Application conn string probably lost too, so do not try to log error here.
If IsDBNull(Session.SessionID) Then
lblMessageOut.Text = "Error: SessionID null."
Server.Transfer("Timeout.aspx?Invalid=SeeErrorLog& Message=" & lblMessageOut.Text)
Exit Sub
End If

If Page.IsPostBack = False Then 'First time thru
Dim objUsers As New License()
Dim intLicensedUsers As Integer = objUsers.LicensedUsers
objUsers = Nothing
If CInt(Application("UsersLoggedOn")) >= intLicensedUsers Then 'If max already logged in, block here
lblMessageOut.Text = "Maximum number of licensed users already logged in. Please try again later."
Exit Sub
End If
End If
End Sub

Sub DoLogin(ByVal objSender As Object, ByVal objArgs As EventArgs)
Dim strUserID As String = txtUserID.Text
Dim strPW As String = txtPW.Text

'Set a flag to indicate successful authentication
Dim blnIsAuthenticated As Boolean = False 'Default until explicitly set to true
Try
objCommand.Parameters.Clear()

If CStr(Application("DBType")) = "SQLServer" Then
strProcName = "psp_ValidateUserID"
objCommand.CommandText = strProcName
objCommand.Parameters.Add("@UserIDParm", strUserID)
Else 'DB2
******
'strProcName = "Administrator.ValidateUserID"
strProcName = "Administrator.Test2"
objCommand.CommandText = strProcName
'objCommand.Parameters.Add("UserIDParm", strUserID)
objCommand.Parameters.Add("test", SqlDbType.VarChar)
objCommand.Parameters("test").Value = strUserID

'objCommand.CommandType = CommandType.Text
'objCommand.CommandText = "Select * From Administrator.Users"
End If
If objConnect.State = ConnectionState.Closed Then
objConnect.Open()
End If
objDataReader = objCommand.ExecuteReader( CommandBehavior.CloseConnection)
******
Catch objError As Exception
lblMessageOut.Text = "Login, Error attempting to validate UserID=" & strUserID & ". " & objError.Message & ". " & objError.Source
Dim objErrorLog As New ErrorLog()
objErrorLog.LogLabTrackError("Y", CStr(Application("LabTrack_ConnectionString")), "Login.aspx.vb", CStr(Session("UserID")), lblMessageOut.Text, Err.Number, Err.Description)
objErrorLog = Nothing
Server.Transfer("./Logout.aspx?Invalid=SeeErrorLog&Message=" & lblMessageOut.Text)
Exit Sub
End Try

**********************************************

Here is the Stored Procedure code
**********************************************
CREATE PROCEDURE test2 ( IN test VARCHAR(50) )
SPECIFIC test2
DYNAMIC RESULT SETS 1
------------------------------------------------------------------------
-- SQL Stored Procedure
-- test
------------------------------------------------------------------------
P1: BEGIN
-- Declare cursor
DECLARE cursor1 CURSOR WITH RETURN FOR
SELECT * from Users;

-- Cursor left open for client application
OPEN cursor1;
END P1
**********************************************