enriquelouse
New Member
Dim strResult As String <BR> Dim objDataReader As System.Data.OleDb.OleDbDataReader <BR> Dim strSQL As String = "SELECT * FROM Decriptions WHERE LangugeID = " & _LanguageID & " AND MenuItem = " & _MenuItem <BR> Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:inetpubwwwrootGlenviewSysDatabaseGlenSys. mdb" <BR> Dim objConn As New System.Data.OleDb.OleDbConnection(strConnection) <BR> Dim objCommand As New System.Data.OleDb.OleDbCommand(strSQL, objConn) <BR> objConn.Open() <BR> objDataReader = objCommand.ExecuteReader <BR><BR> _Description = objDataReader("Description") <BR><BR><BR> objDataReader.Close() <BR> objConn.Close() <BR>__________________________________________________ ______________ <BR><BR>No value given for one or more required parameters. <BR>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <BR><BR>Exception Details: System.Data.OleDb.OleDbException: No value given for one or more required parameters. <BR><BR>Source Error: <BR><BR><BR>Line 61: Dim objCommand As New System.Data.OleDb.OleDbCommand(strSQL, objConn) <BR>Line 62: objConn.Open() <BR>Line 63: objDataReader = objCommand.ExecuteReader <BR>Line 64: <BR>Line 65: _Description = objDataReader("Description") <BR><BR>I gave you my answer see:<BR><BR>http://www.aspmessageboard.com/forum/aspplus.asp?M=428632&T=428479&F=36&P=1here is VB code"<BR><BR> Dim strResult As String<BR> Dim objDataReader As System.Data.OleDb.OleDbDataReader<BR> Dim strSQL As String = "SELECT * FROM Decriptions WHERE LangugeID = " & _LanguageID & " AND MenuItem = '" & _MenuItem & "' "<BR> Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:inetpubwwwrootGlenviewSysDatabaseGlenSys. mdb"<BR> Dim objConn As New System.Data.OleDb.OleDbConnection(strConnection)<BR> Dim objCommand As New System.Data.OleDb.OleDbCommand(strSQL, objConn)<BR> objConn.Open()<BR> objDataReader = objCommand.ExecuteReader<BR><BR> _Description = objDataReader("Description")<BR><BR><BR> objDataReader.Close()<BR> objConn.Close()<BR>---------------------------------------------------------------<BR>I do know in fact that there is a column and there is an data in it<BR><BR><BR><BR>No data exists for the row/column. <BR>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <BR><BR>Exception Details: System.InvalidOperationException: No data exists for the row/column.<BR><BR>Source Error: <BR><BR><BR>Line 63: objDataReader = objCommand.ExecuteReader<BR>Line 64: <BR>Line 65: _Description = objDataReader(1)<BR>Line 66: <BR>Line 67: <BR> <BR>I told you have to use "'" for any sql parameter. You have missed adding it to the first Parameter.<BR><BR>If this doen't work try to response the strSQL and check the values of each parameter and then try to run this query in sql designer in access to see the result of your query