473,472 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

why doesn't this work

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
3 3431
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes...
39
by: Mark Johnson | last post by:
It doesn't seem possible. But would the following also seem a violation of the general notions behind css? You have a DIV, say asociated with class, 'topdiv'. Inside of that you have an anchor...
3
by: Matt | last post by:
I want to know if readOnly attribute doesn't work for drop down list? If I try disabled attribute, it works fine for drop down list. When I try text box, it works fine for both disabled and...
149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
6
by: A.M-SG | last post by:
Hi, I have an aspx page at the web server that provides PDF documents for smart client applications. Here is the code in aspx page that defines content type: Response.ContentType =...
4
by: bbp | last post by:
Hello, In an ASPX page I have a "Quit" button which make a simple redirect in code-behind. This button doesn't work no more since (I think) I moved from the framework 1.0 to 1.1 and it doesn't...
3
by: Dave Moore | last post by:
Hi All, Ok, here's my problem. I want to open a file and process its contents. However, because it is possible that the file may not exist, I also want to check whether the file() function is...
10
by: Sourcerer | last post by:
I wrote this very simple code in .NET VC++. I compiled it on my system, and tried to run it on my friend's computer (he doesn't have the compiler). We both have Windows XP Professional. I have .NET...
6
by: Johnny Jörgensen | last post by:
I've got a usercontrol derived from a normal ComboBox that contains some special formatting code. On my main form I've got a lot of my custom comboboxes. I discovered a bug in the derived...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.