here is an input code i wrote to input data from the user interface to database in access. error occured when i tried to run the problem. the error messages are as follow.
1. ObjCmd is not declared
2. SqlCommand is not defined. - Private Sub submitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submitButton.Click
-
Dim Objconn As New SqlClient.SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\chiscoTransport.mdb;Integrated Security=True;Connect Timeout=30;User Instance=True")
-
Objconn.Open()
-
-
ObjCmd = New SqlCommand("INSERT INTO seatReservation (vehicleID, pname, deptureT, trvllingft, pssngerAD, phoneNo, fare, time, exptdjd, date) VALUES (@vehicleID, @pname, @deptureT, @trvllingft, @pssngerAD, @phoneNo, @fare, @time, @exptdjd, @date)", Objconn)
-
-
-
ObjCmd.Parameters.Add("@vehicleID", Data.SqlDbType.VarChar).Value = vehicleIDComboBox.Text
-
ObjCmd.Parameters.Add("@pname", Data.SqlDbType.Text).Value = pnameTextBox.Text
-
ObjCmd.Parameters.Add("@deptureT", Data.SqlDbType.Text).Value = deptureTComboBox.Text
-
ObjCmd.Parameters.Add("@trvllingft", Data.SqlDbType.Text).Value = trvllingftComboBox.Text
-
ObjCmd.Parameters.Add("@pssngerAD", Data.SqlDbType.Text).Value = pssngerADTextBox.Text
-
ObjCmd.Parameters.Add("@phoneNo", Data.SqlDbType.Int).Value = phoneNoTextBox.Text
-
ObjCmd.Parameters.Add("@fare", Data.SqlDbType.Int).Value = fareTextBox.Text
-
ObjCmd.Parameters.Add("@time", Data.SqlDbType.Text).Value = timeTextBox.Text
-
ObjCmd.Parameters.Add("@exptdjd", Data.SqlDbType.Text).Value = exptdjdTextBox.Text
-
ObjCmd.Parameters.Add("@date", Data.SqlDbType.Text).Value = dateTextBox.Text
-
-
-
Objbtn.ExecuteNonQuery()
-
-
-
Objconn.Close()
-
End Sub
1 977
Have you checked your references?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Tim Reynolds |
last post by:
I support a .Net application running on a SERVER accessing MF Db2
data. Occasionally, we have some type of connection problem that we
have been unable to debug up to this point. We typically...
|
by: Paul H |
last post by:
How do you folks get a reliable and complete brief of what is required
before development starts?
I am forever going back to a client once a project has started saying "Hang
on, now that I've...
|
by: carmen |
last post by:
I'm working in an aplication for a Smart Device that need to "talk" with a
printer continuosly through the serial port. I'm trying to use the John
Hint's sample code "Use P/Invoke to develop a .NET...
|
by: shsandeep |
last post by:
Hi, I get the following error when trying to connect to a database:
(I have cataloged the node and database and they show up in list node
directory and list db directory):
SQL30081N A...
|
by: MenakaMeena |
last post by:
When i try to execute my application based on swing that runs in eclipse platform, the frame is not opening when i login and i get the error (backend is DB2)
Error code: 129
Cannot connect to...
|
by: stevesnow |
last post by:
----------------------------------------------
Please forward this work experience & skills summary
to your Database & software development, MIS/IT/Software Department for review.
...
|
by: mairhtin o'feannag |
last post by:
Hello,
I'm having problems connecting to my new v9 db box. The pertinent
information is below:
DB2_db2inst1 60000/tcp
DB2_db2inst1_1 60001/tcp
DB2_db2inst1_2 60002/tcp
DB2_db2inst1_END...
|
by: ink |
last post by:
Hi all,
My company does things in a very specific way. Meaning we never query the
database directly, we always use Stored Procedures.
What i would like is to develop one data provider class...
|
by: db2doubts |
last post by:
Hi,
I am new to DB2, i want to catalog DB2 databases in Control Center(Windows) but databases exist in AIX server
I catalog the database by following commands in CLP (windows)
=>catalog...
|
by: toffees |
last post by:
Hi,
I am having some problems getting an application server to connect to the database server. Both servers run on Windows 2000 Server. DB2 version 7.2 is running on the database server. I am able...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |