Adding, Deleting Rows From Visual Basic 2005 Express Edition

May 27, 2007



Hi,



I'm a complete novice concerning SQL Server (Express Edition)

I'm trying to Add or Delete rows froma VB 2005 Express Function or Sub. While the program is running everything is ok. Except when restarted added records are gone and deleted records are back.



Have i missed an option during installation?



Thx,

Steven

View 5 Replies


ADVERTISEMENT

Sql Server 2005 Express Edition VS Visual Basic 2005 Express Edition

Dec 1, 2006



Hello..

I've installed Visual Basic 2005 express edition & tried to connect to SQL Server 2005 express edition. I noticed that VB2005 Express Edition doesn't have any OLEDB provider for SQL Server. The only OLEDB Provider is for M.Access. Is this correct? if so, what should i do if i want to connect SQL Server 2005 express edition with VB2005 express edition by using OLEDB connection type?

I really appreciate any respond from you guys.. Thank's and waiting for the good news..

Best regards,
VITRELLE

View 1 Replies View Related

Can I Upload A Database Using Visual Basic 05 Express Edition ?

Feb 17, 2007

Hi,
Can I upload a database using visual basic 05 express edition ? or do I have to download sql server ?
Thanks

View 8 Replies View Related

Windows Vista Business 64 And Microsoft Visual Basic 2008 Express Edition Bad Sqlceme35.dll

Feb 11, 2008

I watched and followed the Intro to VB 2008 Express, but in the final part of the video, when you add a database, i did everything as the video says, still i get:

An error occurred creating the form. See Exception.InnerException for details. The error is: Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Ive tried the fix stated in another forum, the one about changing the "Target CPU" but the option doesn appear, what does appear its the "Platfrom" dropdown list, but its fixed to "Any CPU" and dont have any more options.

Ive also downloaded Microsoft SQL Server Compact 3.5 ENU and "re-installed" and selected repair, followed the steps, rebooted and still nothing.

The problem persists, any ideas, please?

View 6 Replies View Related

How Can I Onnect Visual Basic Express 2005 To A Remote SQL Server Express 2005?

Sep 13, 2006

HiIm trying to connect Visual Basic Express 2005 to a remote SQL Server Express 2005. I cant find how i can do that in VB.net Express.In Web developer there are no problem to connect to a remote SQL server but i cant find it in VB.net Express. The XP with the SQL server that i want to connect to is on the local network. Greatful for help!

View 1 Replies View Related

System.Data.ConstraintException Visual Basic 2005 Express / SQL 2005 Express

Aug 18, 2006

This problem only occurs after deployment, not when debugging. In the table I am having a problem with I have an ID field designated as the primary key with the identity increment set to 1 and the identity seed set to 1. There is no data in the table when deployed. I can add records to the datagridview control but when I try updating the dataset I get this error indicating that the ID field already has a value of 1 present. If I close the application and re-start it, the exception no longer occurrs when I update the dataset. I am including the code to update the tables incase something is wrong there. Any suggestions?

Private Sub UpdateMemberTable()

Me.Validate()

Me.TblMembersBindingSource.EndEdit()

Me.TblMembersTableAdapter.Update(Me.ChurchFamilyDataSet.tblMembers)

Me.TblMemberDependentsBindingSource.EndEdit()

Me.TblMemberDependentsTableAdapter.Update(Me.ChurchFamilyDataSet.tblMemberDependents)

Me.TblMemberContributionsBindingSource.EndEdit()

Me.TblMemberContributionsTableAdapter.Update(Me.ChurchFamilyDataSet.tblMemberContributions)

End Sub

View 3 Replies View Related

Visual Basic 2005 Express And SQL Server 2005 Express - Display Image

Jun 13, 2007

Hi Guys,
I created a Product database table using Visual Basic 2005 Express and SQL Server 2005 Express. I have just added a new column [Picture] to the database table, which of course, should store an image or picture of a product. I am writing to kindly ask you guys for help .


i) How do I include image files into this column [Picture]?
ii) How do I get this image to display on Visual Basic 2005 Express form, so that when a product is selected the product image is displayed accordingly?


Your help much appreciated. Thanks.

Paul

View 8 Replies View Related

SQL Express && Visual Basic 2005

Jul 10, 2007

Hello,



Iam new to Visual basic 2005, I have installed SQL Express and prefers to use ADODB to connect to the database.

This is the code i tried

con.Open(cstring1 = "Provider=SQLNCLI.1;" _

& "Server=(local);" _

& "Database=D:VS 2005 ProjectsMyDB.mdf;" _

& "Integrated Security=SSPI;" _

& "DataTypeCompatibility=80;" _

& "Data Source=server1sqlexpress")



The error is comexception was unhandled,

SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].



Can anyone help me out.

I have SQLExpress installed and Visual studio 2005 installed.

Connection string for ADODB ??



Regards,



Sathyan

View 4 Replies View Related

Visual Basic 2005 Express - SQL Problem

Nov 21, 2007

Hi all, I have a var called sEP which contains a number. The problem I have is calling that var during an SQL query within Visual Basic.  To test the update string I wrote the following query and simply told it to enter the text "Five Stars" on the row which contains the entry '1' in Episode Number column. It works fine. UPDATE JackBennySET Rating= 'Five Stars'
WHERE ([Episode Number]= '1') But how do I replace the '1' in the query with the var sEP (which will contain the actual number I want the query to run against)?I have tried various suggestions from sources including:UPDATE JackBenny SET Rating = 'Five Stars' WHERE [Episode Number] = '" + sEp + "'However, they all fail to update the database at all which makes me think the syntax is incorrect.Any help is very appreciated (I have been seeking help in various places for 2 days now) - I always send small paypal tips to people who help me on forums.       

View 4 Replies View Related

SQL Express 2005 Replication Via Visual Basic

May 9, 2006

yiotis writes "Is there a way where you can programmatically (via visual basic) replicate two or more SQL Express databases located on multiple computers without the need of SQL Server 2005 acting as a publisher. From what i understand this is a limitation in SQL Express.

Right now i have SQL Express installed on 2 machines. I am able via vb to communicate with each database, read and write data between databases but cannot seem to figure out how to perform a simple replication.

Bottom line is, i need to be able to replicate via vb code 2 sql express databases with each other.

Thanks"

View 1 Replies View Related

How Can I Connect A Sql Server Database To Visual Basic 2005 Express

Oct 8, 2007

Hi, i am new to sql server and visual basic, i need to connect my sql server database to a new application i've developed in visual basic 2005 express. Can any one tell me the steps to do this. Many Thanks.

View 2 Replies View Related

Adding A Connection In Visual C++ 2005 Express

Sep 10, 2006

I am new to SQL Server 2005 and Visual C++ 2005 Express.

When I try and add a connection in Visual C++:

DataSource: SQL Server Database File

File Name: c:.......file.mdf

Windows Authentication

I get the following message:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under default settings SQL Server does not allow remote connections. (provider: Share Memeory Provider, error:36 - The Shared Memory dll used to connect to SQL Server 2000 was not found)

Any ideas?



View 5 Replies View Related

Visual Baisc 2005 Express Edition And SQL 2005 Database Diagram Tools

Jan 29, 2008

Hi,

I have created a database using VB Express 2005 express edition and I have created number of tables and SP's etc.

I am trying to use the database diagram tool but I get an error stating that the database doesn't have a valid dbo. I say yes to the prompt about making myself a valid dbo but I then get a message stating that I do not have permissions to imprersonate the dbo.

How do I overocome this issue?

Thanks

Bill

View 4 Replies View Related

T-SQL And Visual Basic 2005 Codes That Execute A User-Defined Stored Procedure In Management Studio Express (Part 2)

Jan 23, 2008

Hi Jonathan Kehayias, Thanks for your valuable response.

I had a hard time to sumbit my reply in that original thread yesterday. So I created this new thread.

Here is my response to the last code/instruction you gave me:

I corrected a small mistake (on Integrated Security-SSPI and executed the last code you gave me.

I got the following debug error message:

1) A Box appeared and said: String or binary data would be truncated.

The statement has been terminated.

|OK|

2) After I clicked on the |OK| button, the following message appeared:

This "SqlException was unhandled

String or binary data would be truncated.

The statement has been terminated."

is pointing to the "Throw" code statement in the middle of

.......................................

Catch ex As Exception

MessageBox.Show(ex.Message)

Throw

Finally

..........

Please help and advise how to correct this problem in my project that is executed in my VB 2005 Express-SQL Server Management Studio Express PC.



Thanks,
Scott Chang

The code of my Form1.vb is listed below:

Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.SqlTypes

Public Class Form1

Public Sub InsertNewFriend()

Dim connectionString As String = "Data Source=.SQLEXPRESS;Initial Catalog=shcDB;Integrated Security=SSPI;"

Dim connection As SqlConnection = New SqlConnection(connectionString)

Try

connection.Open()

Dim command As SqlCommand = New SqlCommand("sp_insertNewRecord", connection)

command.CommandType = CommandType.StoredProcedure

command.Parameters.Add("@procPersonID", SqlDbType.Int).Value = 7

command.Parameters.Add("@procFirstName", SqlDbType.NVarChar).Value = "Craig"

command.Parameters.Add("@procLastName", SqlDbType.NVarChar).Value = "Utley"

command.Parameters.Add("@procAddress", SqlDbType.NVarChar).Value = "5577 Baltimore Ave"

command.Parameters.Add("@procCity", SqlDbType.NVarChar).Value = "Ellicott City"

command.Parameters.Add("@procState", SqlDbType.NVarChar).Value = "MD"

command.Parameters.Add("@procZipCode", SqlDbType.NVarChar).Value = "21045"

command.Parameters.Add("@procEmail", SqlDbType.NVarChar).Value = "CraigUtley@yahoo.com"

Dim resulting As String = command.ExecuteNonQuery

MessageBox.Show("Row inserted: " + resulting)

Catch ex As Exception

MessageBox.Show(ex.Message)

Throw

Finally

connection.Close()

End Try

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

InsertNewFriend()

End Sub

End Class

View 6 Replies View Related

Visual Basic .NET 2005 Express && Sql Server 2005 Express Remote Server

Mar 12, 2007

Hi,
 I want to make a component library in Visual Basic.NET and connect to a remote Sql Server. When I create a new DataSet with the wizard, I can only connect to a .mdf file, but not to a Sql Server. With Visual Web Developer I can connect to a Sql server. What is the difference between these enviroments ? How can I do the same with Visual Basic.NET ?
 Thanks in advance.

View 1 Replies View Related

Visual Studio 2005 Bootstrap Package For SQL Server 2005 Express Edition With Advanced Services SP2

Feb 15, 2008

Hi there,

Anyone know how I can replace (or download) the sqlexpr32.exe bootstrap package with the advanced services SP2 edition of SQL 2005 express ?

Pieter

View 9 Replies View Related

Connecting To SQL Server 2005 From Visual C# 2005 Express Edition

Sep 29, 2006

I had SQL Server Express Edition installed. I then uninstalled both it and Visual C#. I then installed SQL Server 2005 Developer's Edition and reinstalled Visual C# -- both on the same machine. I can connect to SQL Server 2005 using SQL Server Management Studio. However, Visual C# is a different story. When I try to add a new Data Connection, it defaults the data source to .SQLEXPRESS, which is no longer on my machine. I can select .MSSQLSERVER, but when I click on either OK or Test Connection, I time out with an error message -- error 25 - Connection string is not valid. The connection string that is shown at the bottom of the Advanced dialog box is -- Data Source=.MSSQLSERVER;AttachDbFilename=E:InventoryDataInventory_Data.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True

View 12 Replies View Related

SQL Server 2005 Express Edition And Visual Studio.net

Jun 29, 2007

I work for a school district and our business lab is looking at using Visual Studio.net and since MSDE is being replaced by SQL Server Express 2005, will that work with Visual Studio.net for creating applications.



Thanks ahead of time.

View 1 Replies View Related

Adding Users To SQL Server 2005 Express Edition

Mar 26, 2008

I am sure that I am missing something which is why I am in need of the communities assistance...

I have installed SQL Server 2005 Express Edition. I can log in with the Windows Authenication and the SQL Server Authentication using the 'sa' account. This is all good...

What I want to be able to do is add 1 to 3 more users so they can gain access to the database I have created to run queries and add data. This is the part I am confused about. How do I get additional users added??

Thanks in advance for your time and assistance!

View 3 Replies View Related

Error Connecting To The Sqlserver Express Edition From Visual Web Developer 2005

Dec 19, 2007

hello eveyone..i have just downloaded and installed the visaul web developer 2005 express edition and sqlserver 2005 express edition.On top of that i even downloaded and installed the northwind database.But my problem is when i am connecting to the northwind database by clicking toos menu>connect to the database>choose datasource>new connection>..i have provided it with the required information..but as soon as i press "Test Connection" button the following error box displays.. "an error has occured while establishing a connection to the server.when connecting to the sql server2005,this failure may be caused by the fact that under default settings sql server doestnot allow remote connections.(provider:Named piped providers,error:40-couldnot open a connection to sqlserver.)" i have no idea whats is all about..can anyone get me pass this error..    

View 2 Replies View Related

Whether SQL Server 2005 Express Edition Can Work With Visual Studio 2003 (Ver 1.1)

Mar 3, 2006

We are new to SQL Server 2005 Express Edition. We are going to develope a solution for one of our client and we have to decide on which database to use for the solution. Client wanted to have a low cost solution. Thus we were not in a position to push them for SQL Sever 2000.

In the process, we also thought of having MySQL as one of the option. Another option we have is to use SQL Server 2005 Express Edition.

We wanted to know if SQL Server 2005 Express Edition can be used with Visual Studion 2003 (Ver 1.1) or it can only be used with Visual Studio 2005 (Ver 2.0)?

Hope to get feedback soon.

Regards

Sanjeev



View 1 Replies View Related

Error During Setup Of Microsoft Sql Express 2005 Edition For Visual Web Design?

Oct 11, 2006

error saying disk compressed or encryted, choose another drive?

how should i t-shoot !!!!!

View 1 Replies View Related

Connecting Visual Studio 2003 To SQL Server Express 2005 Edition

Jan 11, 2006

I was wondering if it is possible to connect the SQL Server 2005 Express Version to Visual Studio 2003.If its possible , how can it be done?Cos i seem to have an error if i do so.

View 4 Replies View Related

Cannot Open / Create SQL Express Databases (.mdf Files) In Visual Studio 2005 Professional Edition

Sep 7, 2007

Hi, I am trying to open or create a sqlexpress database within Visual Studio 2005 Professional in the App_Data folder.  If I attempt either method, I get the following dialog box:Required Components MissingConnections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL:  http://go.microsoft.com/fwlink/?LinkID=49251 The link above just takes you to the download page for Sql Server Express 2005. I have both SQL Server 2005 Developer and SQL Server 2005 Expression instances running.  The existing database will work properly in my web application, however I cannot access it through Visual Studio.As background, I did have a problem connecting to the database via the web application, receiving a "Failed to generate a User Instance of SQL Server" error.  But I was able to fix that by renaming my SQLEXPRESS folder in C:Documents and SettingsuserLocal SettingsApplication DataMicrosoftMicrosoft SQL Server Data.  When the web page ran, it created another SQLEXPRESS folder.However, I cannot figure out why I am having the other issue.Thanks in advancePatrick  

View 1 Replies View Related

Unable To Open A SQL Express DB Created In Visual Basic Express

Dec 14, 2007

When I start Management Studio I get the following message and a suggestion to change a setting:
(I can choose to continue and the system databases appear, but the DB I created does not.) 
 "Unhandled exception has occurred in a component in your application. Cannot create a stable subkey under a volitile parent key."
 
 ************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Any assistance is appreciated.

View 1 Replies View Related

Loading Images In A SQL Server Express Database Table At Design Time Using Visual Basic Net Express Editon

Jun 24, 2007

I am new to this type of programming and and have read all articles on adding an image to the database and it seems they all use sql queries to add an image but I want to add an image at design time. I am using Visual Basic 2005. I am also using Visual Basic 2005 Express Edition to try the same thing. I am trying to build a Translator program for english to Brazilian Portuguese and the reason I want to add the images is so that when I translate the word cat from english to Portuguese, I can also show an image of a cat. Can anyone please help me

View 3 Replies View Related

Can I Install Visual Studio 2008 Without The SQL Server 2005 Express And Use Instead My SQL Server 2005 Developer Edition?

Feb 22, 2008

(1) I have already installed of SQL Server 2005 Developer Edition first.

(1) Can I install visual studio 2008 without the 2005 express edition of SQL server? Will be any problems because I don't have express edition of SQL server? Do I need to install the express edition of SQL server as well?

(3) How to use SQL Server 2005 Developer Edition instance on visual studio 2008?

View 3 Replies View Related

Problem With Adding And Deleting Rows

Jan 6, 2008

Hi dear users,

I have a crisis situation with my simple database project. Let me introduce You to the topic.

I've created table ZAKLADY in my db:






Code Block

CREATE TABLE ZAKLADY
(ZAKL_ID INT IDENTITY(10,10) CONSTRAINT PK_ZAKLADY PRIMARY KEY,
ZAKL_NAZWA VARCHAR(25),
ZAKL_MIASTO VARCHAR(20),
ZAKL_ULICA VARCHAR(30) );


Then, I've made procedure which adds one row:






Code Block

CREATE PROCEDURE Zakl_AddNewRow
@zakl_nazwa VARCHAR(25),
@zakl_miasto VARCHAR(20),
@zakl_ulica VARCHAR(30)
AS
INSERT INTO Zaklady (Zakl_Nazwa, Zakl_Miasto, Zakl_Ulica)
VALUES (@zakl_nazwa, @zakl_miasto, @zakl_ulica)


Also I've made procedure which deletes the row.





Code Block

CREATE PROCEDURE Zakl_DeleteRow
@zakl_id INT
AS
DELETE Zaklady
WHERE Zakl_ID=@zakl_id

So what's the point of my problem?

If I execute the procedure "Zakl_AddNewRow", I will add a new row to ZAKLADY table. Column ZAKL_ID is added automaticly
because, as You can see, it is declared as INT IDENTITY(10,10). I have added 5 rows so the ZAKL_ID values will be adequately 10,20,30,40,50.
Now I delete the row with ZAKL_ID = 30.
After it I add new row once again.
The result is that the ZAKL_ID value will be 60.

So the number "30" of the identity sequence became unsigned to any ZAKL_ID.
I wanted that new row which was added has ZAKL_ID=30 not 60. The second added row should have ZAKL_ID=60.
Is there any possibility to do this.If yes, What should I change in sql code.

Thank You for all replies

Maciej

View 6 Replies View Related

Sql Evalution Version And Visual Basic Express

Jan 22, 2007

i have sql enterpirse evaluation version and visual basic express loaded on the same machine. from inside vb, when i select from the main menu project->new item then select the sql database icon then the add button i get the following error.
connections to sql server files (*.mdf) require sql server express 2005 to function properly. Please verify the installation of the coponent or dowload from the URL: http://go.microsoft.com/fwlink/!linkID=4951
does vb express work with sql enterprise evaluation version or not ??
if so, what is it that i'm missing.

View 2 Replies View Related

How To Backup My Database Using Visual Basic Express 2008

Mar 28, 2008

I have an application written with Visual Basic Express 2008, which has a Sql Server Express Compact database incorporated into the application. I've been trying to follow the suggestions listed on several threads on how to backup up my database and have not gotten very far. The following code seems to be in most threads.


Dim dbstring = "Data Source=.SQLExpress;Integrated Security=true;User Instance=true;AttachDBFilename=|DataDirectory|ImmuLogDataBase.sdf"

Dim sqlconn As New SqlClient.SqlConnection(dbstring)

sqlconn.Open()


When run, this code returns the following error at the sqlconn.Open() command.

An attempt to attach an auto-named database for file G:ImmuLogImmuLoginDebugImmuLogDataBase.sdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

My solution is saved on a flash drive which I take between home and work. I'm hoping that that isn't the issue. I believe that Visual Basic loads the database when it starts and it is already open when this code is run. Is there a way to access this open database and run a backup procedure on it from within VB express 2008?

I'm new to this and self taught so explain everything in detail. Thanks for your help.
Bruce

View 3 Replies View Related

Getting Up And Running With Visual SQL Server 2005 Express And Visual Web Developer 2005 Express

Apr 11, 2006

I've downloaded and installed both of these (VWD installs both) and have been trying to run through the walkthrough of setting up a web application which supports membership. However, no matter what I do I invariably get errors like the following:


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
I'm concerned why VWD and VSQL express versions don't run correctly out of the box (so to speak). I'm not an expert on configuring these services -- but that's the point of offering these tools to hobbyists: So we can learn about how to make some of these great applications using MS tools.
My configuration::


Windows XP SP2 -- clean machine as of about a month ago, never had any dev tools, web servers, or the like on it.

IIS is installed and the service says its running

VSQL and VWD express versions installed (no errors on installation)

SQL server service indicates it is running

.Net 2.0 framework installed (no errors on installation)

Note: I've tried installing on two separate machines. Obviously I'm missing something fundamental.

Would someone please help me go through the million things I [apparently] need to do to configure all these tools so I can get on to actually coding up my first web application? If this is documented somewhere, all I can say is I tried to find it but it certainly wasn't obvious.

View 3 Replies View Related

Problem When Opening The Sql Server Express In Visual Web Developmer Express Edition

May 17, 2007

 hii download free starter kit timetraker application( i downloaded both Visual web devaloper and sql server express from the Internet) when i tried to run it it is showing the following errorAn error has occurred while establishing a connection to
the server.  When connecting to SQL Server 2005, this failure may be
caused by the fact that under the default settings SQL Server does not
allow remote connections. (provider: Shared Memory Provider, error: 40
- Could not open a connection to SQL Server)plz give me the solution above error thanks in advance vittal 

View 2 Replies View Related

Visual Basic 2005 Problem

Feb 22, 2007

Hi i am trying to trying to delete a reocrd from a Microsoft Access Database in Visual Basic 2005 Express Edition, but come up with this error with the following code. I'm new to vb 2005 and I'm no expert. Appreciate any help given.

-----------------
InvalidCastException was unhandled
Unable to cast COM object of type 'System.__ComObject' to class type 'System.Windows.Forms.TextBox'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface

Dim db1 As Connection
Dim rs As Recordset

db1 = New ADODB.Connection
db1.Provider = "Mircosoft.jet.OLEDB.4.0;"
db1.ConnectionString = "Provider = 'Microsoft.Jet.OLEDB.4.0';Data Source = 'M:Year2 New262CSvb cwrk1vb cwrk1orders.mdb';"
db1.Open()
rs = New ADODB.Recordset
rs.Open("select * from orders", db1, ADODB.CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)

txtOrderID = rs("OrderID")
txtProduct = rs("Product")
txtPrice = rs("UnitPrice")
txtQuantity = rs("Quantity")
txtDate = rs("OrderDate")
txtRecieved = rs("Received")
txtSupplierID = rs("SupplierID")

Also when i try to add a record to a database i get the following error i have made sure all the data i have typed in the text boxes are the correct data types.
COME Exception was unhandled
No value given for one or more required parameters.

Dim objcommand As Command = New Command()
Dim conn As Connection = New Connection()
Dim cmdreader As Recordset = New Recordset

conn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=M:Year2 New262CSvb cwrk1vb cwrk1orders.mdb")
objcommand.ActiveConnection = conn

Dim stqSQLInsert As String
stqSQLInsert = "INSERT INTO Orders(OrderID, Product, Unitprice, Quantity, Orderdate, Received, SupplierID) VALUES (txtOrderID.Text, txtProduct.Text, txtPrice.Text, txtQuantity.Text, txtDate.Text, txtReceived.Text, txtSupplierID.Text)"

objcommand.CommandText = stqSQLInsert
cmdreader.Open(stqSQLInsert, conn, CursorTypeEnum.adOpenDynamic, LockTypeEnum.adLockOptimistic)

objcommand.Execute()
cmdreader.Update()

Thnx to any who helps...

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved