- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
-
Dim Cmd As New OleDbCommand
-
Dim SQL As String
-
Dim DbCmd As New OleDbCommand
-
Dim conn As New OleDbConnection()
-
-
-
-
conn.ConnectionString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=C:\Documents and Settings\Owner\My Documents\Results2012.accdb"
-
conn.Open()
-
SQL = "INSERT INTO Game_Summary(Week,Opponent,Game1,Game2,Game3,OP Game1,OP Game2,OP Game3,Series,OP Series,Wins,OP Wins)" & _
-
"VALUES('?','?','?','?','?','?','?','?','?','?','?','?');"
-
Cmd = New OleDbCommand(SQL, conn)
-
Cmd.Parameters.AddWithValue("Week", ListBox2.Text)
-
Cmd.Parameters.AddWithValue("Opponent", TextBox89.Text)
-
Cmd.Parameters.AddWithValue("Game1", TextBox26.Text)
-
Cmd.Parameters.AddWithValue("Game2", TextBox27.Text)
-
Cmd.Parameters.AddWithValue("Game3", TextBox28.Text)
-
Cmd.Parameters.AddWithValue("OP Game1", TextBox55.Text)
-
Cmd.Parameters.AddWithValue("OP Game2", TextBox67.Text)
-
Cmd.Parameters.AddWithValue("OP Game3", TextBox68.Text)
-
Cmd.Parameters.AddWithValue("Series", TextBox29.Text)
-
Cmd.Parameters.AddWithValue("Op Series", TextBox83.Text)
-
Cmd.Parameters.AddWithValue("Wins", TextBox63.Text)
-
Cmd.Parameters.AddWithValue("Op Wins", TextBox71.Text)
-
-
-
-
DbCmd = New OleDbCommand(SQL, conn)
-
DbCmd.ExecuteNonQuery()
-
conn.Close()
2 1129
Please use code tags when posting code.
I have no idea what your question is.
But I'll take a stab at the solution and it's because you use nonstandard characters in your field names (in this case, spaces). When you do that, you must demarcate it as a field using square brackets.
You should also not give your parameters the same name as your fields, that will just cause ambiguity.
Thanks,
I understand completely
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Steve |
last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone
can explain to me why it was reported that way.
...
|
by: kosta |
last post by:
hello! one of my forms communicates with a database, and is
supposed to add a row to a table using an Insert
statement... however, I get a 'oledb - syntax error'
exception... I have double...
|
by: Kim Nørby Andersen |
last post by:
Hello there
I am lost. i receive the output in the bottom, from a site that runs
excellently on our development server, but dies on the customer. We have had
a first version running at the...
|
by: r.nikhilk |
last post by:
Hi,
Currently, we are porting C++ applications from 32 bit to 64 bit on AIX
platform. (The current version of AIX is 5.3 and xlC verison is 8.0).
We are able to compile the applications by...
|
by: Manuel |
last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using
devc++.
So I've imported the glut32.dsp into devc++, included manually some
headers, and start to compile.
It return a very...
|
by: WT |
last post by:
Hello,
Using VS2005, when I open the global.asax file, the editor underlines in
blue all the line with a tooltip saying 'Syntaxe error '.
<%@ Application Language="C#"...
|
by: leaf0209 |
last post by:
Hi,
I am new to this forum and have been troubled by this problem for the past few days. I would appreciate if someone would take a look and help me out.
I am using vb express 2005 edition...
...
|
by: Scott Gravenhorst |
last post by:
Windows XP SP3
My application is set to open a SaveFile dialog when an exit is
requested. When I click the app's close button, the save dialog
opens, but when I click to change the folder, the...
|
by: Chris Kennedy |
last post by:
Hi all
I'm running SQL Server 2005 Express Edition.
One database
One table called Sites
Fields as follows:
id (bigint, Identity, Primary Key)
SiteName (varchar(50), allows nulls)
Generation...
|
by: Mike Copeland |
last post by:
I'm getting a syntax error on the "typedef" code line here. Any
thoughts on why? TIA
struct CSTYPE
{ // City/State Record
string csKey; ...
|
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: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
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...
| |