.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old March 26th, 2003, 03:13 AM
franknitty69 franknitty69 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 3 franknitty69 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
oledb error with access database

i have an access database and i'm trying to access it using the oledb properties. here is my procedure:<br><br><br>Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnLogin.Click<br> Dim objConnection As OleDbConnection<br> Dim objCommand As OleDbCommand<br> Dim objDataReader As OleDbDataReader<br> Dim strSQLQuery As String<br><br> objConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=D:WWWRoot echempirenetdatabase echempire.mdb;")<br><br> strSQLQuery = "SELECT * FROM users_tb WHERE userName = " & txtUsername.Text<br><br> objCommand = New OleDbCommand(strSQLQuery, objConnection)<br><br> objConnection.Open()<br><br> objDataReader = objCommand.ExecuteReader(CommandBehavior.CloseConn ection)<br><br> lblSQLCommandLabel.Text = strSQLQuery<br><br> EmployeeDataGrid.DataSource = objDataReader<br> EmployeeDataGrid.DataBind()<br> End Sub<br><br><br><br>when i execute the page i get the following error:<br><br><br>Server Error in '/' Application.<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>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. <br><br>Stack Trace: <br><br><br>[OleDbException (0x80040e10): No value given for one or more required parameters.]<br> System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr) +41<br> System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult) +154<br> System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult) +92<br> System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult) +65<br> System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method) +112<br> System.Data.OleDb.OleDbCommand.ExecuteReader(Comma ndBehavior behavior) +57<br> techempire.login.btnLogin_Click(Object sender, ImageClickEventArgs e) in CevelopmentVisual Studio ProjectsVSWebCachewww.techempire.netlogin.aspx.vb: 66<br> System.Web.UI.WebControls.ImageButton.OnClick(Imag eClickEventArgs e) +109<br> System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +69<br> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18<br> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33<br> System.Web.UI.Page.ProcessRequestMain() +1263<br><br> <br><br><br>--------------------------------------------------------------------------------<br>Version Information: Microsoft .NET Framework Version:1.0.3705.288; ASP.NET Version:1.0.3705.288<br><br><br>PLEASE HELP!!! <img border="0" src="/forum/emoticons/freaked.gif" height="30" width="18" alt="freaked" />

Reply With Quote
  #2  
Old March 27th, 2003, 09:18 PM
Andrew Andrew is offline
dotNetBB Forums Developer
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 265 Andrew User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to Andrew Send a message via AIM to Andrew Send a message via Yahoo to Andrew
Do you have the EmployeeDataGrid declared in the class? I don't see it listed in your code.<p><hr size="1" width="50%" align="left" />dotNetBB Forum Developer<br><b><i>Building A Better Community, One Post At A Time</i></b><br><a href="http://www.dotnetbb.com" target="_blank">www.dotnetbb.com</a></p>

Reply With Quote
  #3  
Old April 9th, 2003, 06:10 PM
warzwar warzwar is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 1 warzwar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
search for this 80040e10 in googloe or any search engine it have some discribe for u.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > oledb error with access database


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT