By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,165 Members | 1,429 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,165 IT Pros & Developers. It's quick & easy.

why doesn't this work

P: n/a
I get this error
Server Error in '/' Application.
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
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.

Exception Details: System.Data.OleDb.OleDbException:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Source Error:
Line 77: dbConnection.Open()
Line 78: End If
Line 79: gotValue = cmdGetPermissions.ExecuteScalar()
Line 80:
Line 81: dbConnection.Close()

Source File: c:\inetpub\wwwroot\reschiniFunctions.vb Line: 79

Stack Trace:
[OleDbException (0x80004005): IErrorInfo.GetDescription failed with
E_FAIL(0x80004005).]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)
+41

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
+92
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteScalar() +185
localhost.reschiniFunctions.hasReadAccess(String formName) in
c:\inetpub\wwwroot\reschiniFunctions.vb:79
localhost.directory.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\directory.aspx.vb:149
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573

ever time i call this function in vb.net

' checks to see if user is able to read data on that form
Public Function hasReadAccess(ByVal formName As String) As Boolean
Dim cmdGetPermissions As New OleDb.OleDbCommand("SELECT read from
userformaccess where userName = 'default' and formname = 'directory'")
Dim gotValue As Boolean = False
cmdGetPermissions.Connection = dbConnection
If dbConnection.State = ConnectionState.Closed Then
dbConnection.Open()
End If
gotValue = cmdGetPermissions.ExecuteScalar()
dbConnection.Close()
End Function

why is it giving me that error? the table its pulling from is set up like
this in access, all my other db commands work but this one... whats wrong
with it? the select statement works in access with no problem at all

userFormAccess table
=================
id autonumber primary key
userName text
read yes/no
write yes/no
delete yes/no
formName text
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Wrap the ExecuteScalar in a try catch and see if you get any more info but I
think the problem is that username is a reserved word. Just for a test,
change it to _username and see if it works. This is the most likely culprit
b/c the connection is opening and you arne't getting permission exceptions.
In Access, if you use Date as a FieldName, it'll blow up on you, and I'm
guessing that username is the problem, it's defenitely a SQL Server reserved
word although SQLClient it pretty cool about it.

HTH
Let me know.

Cheers,

Bill
"Brian Henry" <br******@adelphia.net> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
I get this error
Server Error in '/' Application.
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
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.

Exception Details: System.Data.OleDb.OleDbException:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Source Error:
Line 77: dbConnection.Open()
Line 78: End If
Line 79: gotValue = cmdGetPermissions.ExecuteScalar()
Line 80:
Line 81: dbConnection.Close()

Source File: c:\inetpub\wwwroot\reschiniFunctions.vb Line: 79

Stack Trace:
[OleDbException (0x80004005): IErrorInfo.GetDescription failed with
E_FAIL(0x80004005).]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr) +41

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult) +92
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteScalar() +185
localhost.reschiniFunctions.hasReadAccess(String formName) in
c:\inetpub\wwwroot\reschiniFunctions.vb:79
localhost.directory.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\directory.aspx.vb:149
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

ever time i call this function in vb.net

' checks to see if user is able to read data on that form
Public Function hasReadAccess(ByVal formName As String) As Boolean
Dim cmdGetPermissions As New OleDb.OleDbCommand("SELECT read from
userformaccess where userName = 'default' and formname = 'directory'")
Dim gotValue As Boolean = False
cmdGetPermissions.Connection = dbConnection
If dbConnection.State = ConnectionState.Closed Then
dbConnection.Open()
End If
gotValue = cmdGetPermissions.ExecuteScalar()
dbConnection.Close()
End Function

why is it giving me that error? the table its pulling from is set up like
this in access, all my other db commands work but this one... whats wrong
with it? the select statement works in access with no problem at all

userFormAccess table
=================
id autonumber primary key
userName text
read yes/no
write yes/no
delete yes/no
formName text

Nov 20 '05 #2

P: n/a
if i change the commandtext to just this
Dim cmdGetPermissions As New OleDb.OleDbCommand("SELECT read from
userformaccess")

it still crashes with the same exact error, and try catch gave me the same
information really... im really confused on this because im useing a similar
statement in a diffrent place and it works fine... what exactly does that
error mean?!

"William Ryan" <do********@comcast.nospam.net> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
Wrap the ExecuteScalar in a try catch and see if you get any more info but I think the problem is that username is a reserved word. Just for a test,
change it to _username and see if it works. This is the most likely culprit b/c the connection is opening and you arne't getting permission exceptions. In Access, if you use Date as a FieldName, it'll blow up on you, and I'm
guessing that username is the problem, it's defenitely a SQL Server reserved word although SQLClient it pretty cool about it.

HTH
Let me know.

Cheers,

Bill
"Brian Henry" <br******@adelphia.net> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
I get this error
Server Error in '/' Application.
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
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.

Exception Details: System.Data.OleDb.OleDbException:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Source Error:
Line 77: dbConnection.Open()
Line 78: End If
Line 79: gotValue = cmdGetPermissions.ExecuteScalar()
Line 80:
Line 81: dbConnection.Close()

Source File: c:\inetpub\wwwroot\reschiniFunctions.vb Line: 79

Stack Trace:
[OleDbException (0x80004005): IErrorInfo.GetDescription failed with
E_FAIL(0x80004005).]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32

hr)
+41

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object&

executeResult)
+92
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteScalar() +185
localhost.reschiniFunctions.hasReadAccess(String formName) in
c:\inetpub\wwwroot\reschiniFunctions.vb:79
localhost.directory.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\directory.aspx.vb:149
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


Version Information: Microsoft .NET Framework Version:1.1.4322.573;

ASP.NET
Version:1.1.4322.573

ever time i call this function in vb.net

' checks to see if user is able to read data on that form
Public Function hasReadAccess(ByVal formName As String) As Boolean
Dim cmdGetPermissions As New OleDb.OleDbCommand("SELECT read from
userformaccess where userName = 'default' and formname = 'directory'")
Dim gotValue As Boolean = False
cmdGetPermissions.Connection = dbConnection
If dbConnection.State = ConnectionState.Closed Then
dbConnection.Open()
End If
gotValue = cmdGetPermissions.ExecuteScalar()
dbConnection.Close()
End Function

why is it giving me that error? the table its pulling from is set up like this in access, all my other db commands work but this one... whats wrong with it? the select statement works in access with no problem at all

userFormAccess table
=================
id autonumber primary key
userName text
read yes/no
write yes/no
delete yes/no
formName text


Nov 20 '05 #3

P: n/a
i figured it out with your help, read was a reserved word which was causeing
the crash, didn't even think about reserved words...
"William Ryan" <do********@comcast.nospam.net> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
Wrap the ExecuteScalar in a try catch and see if you get any more info but I think the problem is that username is a reserved word. Just for a test,
change it to _username and see if it works. This is the most likely culprit b/c the connection is opening and you arne't getting permission exceptions. In Access, if you use Date as a FieldName, it'll blow up on you, and I'm
guessing that username is the problem, it's defenitely a SQL Server reserved word although SQLClient it pretty cool about it.

HTH
Let me know.

Cheers,

Bill
"Brian Henry" <br******@adelphia.net> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
I get this error
Server Error in '/' Application.
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).
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.

Exception Details: System.Data.OleDb.OleDbException:
IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Source Error:
Line 77: dbConnection.Open()
Line 78: End If
Line 79: gotValue = cmdGetPermissions.ExecuteScalar()
Line 80:
Line 81: dbConnection.Close()

Source File: c:\inetpub\wwwroot\reschiniFunctions.vb Line: 79

Stack Trace:
[OleDbException (0x80004005): IErrorInfo.GetDescription failed with
E_FAIL(0x80004005).]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32

hr)
+41

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object&

executeResult)
+92
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteScalar() +185
localhost.reschiniFunctions.hasReadAccess(String formName) in
c:\inetpub\wwwroot\reschiniFunctions.vb:79
localhost.directory.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\directory.aspx.vb:149
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


Version Information: Microsoft .NET Framework Version:1.1.4322.573;

ASP.NET
Version:1.1.4322.573

ever time i call this function in vb.net

' checks to see if user is able to read data on that form
Public Function hasReadAccess(ByVal formName As String) As Boolean
Dim cmdGetPermissions As New OleDb.OleDbCommand("SELECT read from
userformaccess where userName = 'default' and formname = 'directory'")
Dim gotValue As Boolean = False
cmdGetPermissions.Connection = dbConnection
If dbConnection.State = ConnectionState.Closed Then
dbConnection.Open()
End If
gotValue = cmdGetPermissions.ExecuteScalar()
dbConnection.Close()
End Function

why is it giving me that error? the table its pulling from is set up like this in access, all my other db commands work but this one... whats wrong with it? the select statement works in access with no problem at all

userFormAccess table
=================
id autonumber primary key
userName text
read yes/no
write yes/no
delete yes/no
formName text


Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.