Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 25th, 2008, 05:29 AM
Authorized User
 
Join Date: Dec 2006
Location: Accra, , Ghana.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connection Error

I am getting an error.
Error reads "ExecuteNonQuery:Connection property has not been initialized"

This happens when i am INSERTING data into a database.
Code looks like this:

constr = "INSERT INTO TABLE values(......)"
concmd = New OleDbCommand(constr, con)
count = concmd.ExecuteNonQuery

Please help.

Reply With Quote
  #2 (permalink)  
Old March 25th, 2008, 07:26 AM
Authorized User
 
Join Date: Sep 2007
Location: , , Finland.
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

And con is ... exactly what? OleDbConnection object? Has it been instantiated or is it null?
Reply With Quote
  #3 (permalink)  
Old March 27th, 2008, 04:56 AM
Authorized User
 
Join Date: Dec 2006
Location: Accra, , Ghana.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

con is the OleDbConnection.
I have found what the error was.
My con is in a file which was not called.
Now that the file is called we are able to connect.

Thanks

Reply With Quote
  #4 (permalink)  
Old April 4th, 2008, 12:46 AM
Registered User
 
Join Date: Apr 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

asp

Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection Error kingroon Classic ASP Basics 3 January 10th, 2008 07:48 PM
Connection Error zaghmout ASP.NET 2.0 Professional 3 October 31st, 2007 01:55 AM
connection error jigsy ADO.NET 1 May 22nd, 2007 08:00 AM
connection error janees ASP.NET 2.0 Professional 1 March 2nd, 2007 01:26 PM
Connection Error: Please Help code_lover ADO.NET 3 February 6th, 2007 09:12 PM



All times are GMT -4. The time now is 09:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.