Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
Password Reminder
Register
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 December 26th, 2009, 07:37 AM
Authorized User
Points: 378, Level: 6
Points: 378, Level: 6 Points: 378, Level: 6 Points: 378, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 67
Thanks: 6
Thanked 0 Times in 0 Posts
Default VB.Net (open database)

Hi Everyone,

Can someone please tell me what is wrong with this code?
When I run it, it stops at the ExecutiveNonQuery

<Public Sub ProjectFeed_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim connect As New OleDb.OleDbConnection
Dim sqlString As String
Dim projCommand As OleDb.OleDbCommand

connect.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = D:\Pharmout Documents\Project.mdb"
connect.Open()
sqlString = "Insert into Projects " & "(Project No,Client,Rate Type,Description,Starting date,Location,Status,Comment,Manager)" & _
"values(txtProjectNo.text,txtclient.text,cmbRate.t ext,txtDescription.text,txtStart.text, txtlocation.text, ,txtStatus.text,txtComment.text,txtManager.text)"
projCommand = New OleDb.OleDbCommand(sqlString, connect)
projCommand.ExecuteNonQuery()
Me.Hide()
connect.Close()
End Sub/>

Thanks
Khalil
Reply With Quote
  #2 (permalink)  
Old January 2nd, 2010, 01:08 AM
Authorized User
 
Join Date: Nov 2009
Location: Portsmouth,NH
Posts: 22
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via Yahoo to msherburne84
Default

What is your error message? There could be a problem with your SQL statement.
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
Read an already open Excel file in VB.NET sunilr General .NET 4 February 28th, 2014 07:20 AM
Unable to open excel file thru vb.net sreeramulu Javascript 5 December 6th, 2013 04:19 AM
Can't open the database; VS.net 2002/Framework 1.0 cJeffreywang ASP.NET 1.0 and 1.1 Professional 6 March 22nd, 2007 06:57 PM
Open a PDF in VB.NET brianvkn Visual Studio 2005 0 February 27th, 2007 05:21 PM
open pdf within VB.NET saphiroth Pro VB.NET 2002/2003 0 December 16th, 2004 10:12 AM



All times are GMT -4. The time now is 04:57 AM.


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