Wrox Programmer Forums
.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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 26th, 2009, 07:37 AM
Authorized User
Join Date: Dec 2009
Posts: 69
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"
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)
End Sub/>

Old January 2nd, 2010, 01:08 AM
Authorized User
Join Date: Nov 2009
Posts: 22
Thanks: 1
Thanked 3 Times in 3 Posts
Send a message via Yahoo to msherburne84

What is your error message? There could be a problem with your SQL statement.

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 05: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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.