Questions tagged [oledbcommand]

Represents an SQL statement or stored procedure to execute against a data source using OLE DB provider.

451 questions
0
votes
0 answers

Data Type Mismatch when passing DateTimePicker.Value

I was struggling so much with something that I eventually found out how to fix, but I don't know the underlying cause. If I add a DateTimePicker (in this case, dtRecordBatchDate) to a form and the user doesn't change it's default date and time and I…
Ehsan88
  • 3,569
  • 5
  • 29
  • 52
0
votes
3 answers

Missing semicolon (;) at end of SQL statement. Semicolon already exists

I keep getting this error Missing semicolon (;) at end of SQL statement. when I run this code: Dim cmd3 As OleDbCommand = New OleDbCommand("INSERT INTO Tickers (Quarter_Balance_Sheets) VALUES (Scrapalbe) WHERE Ticker = A;",…
gromit1
  • 577
  • 2
  • 14
  • 36
0
votes
1 answer

Update data in MSACCESS

I have the following code to update the student record. It is working without any error or exception but it is not updating the record. I do not understand why this is happening. private void btnUpdate_Click(object sender, EventArgs e) { …
Muzamil Abbas
  • 692
  • 8
  • 16
0
votes
3 answers

Insert syntax error

I have this sql command in oledbcommand : insert into…
Ehsan Sadeghi
  • 117
  • 1
  • 4
  • 17
0
votes
0 answers

Updating multiple tables using .NET and Access

Really sorry if this has been asked 10000 times but i couldn't find anything about it. I'm making backup copies of database tables from a dev site to a live site and i am using this code to do so but i have another 10 tables to copy over and I'm…
Andy Dyas
  • 31
  • 8
0
votes
1 answer

SQL in my WCF Service Application

"SELECT SUM(Cost) FROM Repair WHERE RepairDate BETWEEN '" + startdate + "' AND '" + enddate + "'"; Hi all, besides changing it to parameterized queries, it there anything wrong with this sql? when i try to ExecuteScalar, it gives me Data type…
Mindless
  • 2,352
  • 3
  • 27
  • 51
0
votes
1 answer

Searching data in my database

My work here is working but if search 1 it display 40 instead of 900 here is my work: command.CommandType = CommandType.Text; command.CommandText = ("SELECT * FROM Computation WHERE Transaction_ID LIKE '" + textBox1.Text.ToString() +…
Marilou Magat
  • 37
  • 1
  • 2
  • 12
0
votes
2 answers

update data value in my database

i have a combobox populated with data : Beef Calamansi Chicken Egg Fish Fish_Sauce Oil Pork Rice Soy_Sauce Vegetables Vinegar then if choose the Beef in my comboBox then press a button it will search my database Stocks_Name for Beef then in my…
Marilou Magat
  • 37
  • 1
  • 2
  • 12
0
votes
1 answer

Error inserting into Oracle via parameters (Not all Variables bound)

As far as I can tell, all parameters are bound... Any ideas? I've tried to find definitive answers, and tried adding these as parameters with explicit data types (the current code) and also just using the .addwithvalue (commented-out code). Still…
ainwood
  • 992
  • 7
  • 17
0
votes
1 answer

updating column value in Ms-Access 2010 using c# and oledb query

I am struggling for updating record/columnvalue in MS-ACCESS database... help would be appreciated a lot..! I am displaying a list of partnumbers retrieved from a table in Ms-access using Datagridview in which I am supposed to update/change…
rtvalluri
  • 557
  • 2
  • 6
  • 22
0
votes
1 answer

OLEDBCommand handle missing database row

I have 2 tables, products, and author, the author table has a column that relates to the product table by an ID so I have done a select statement below to get the right rows based on the ID's. However the author table might not have any data in and…
Bryony Lloyd
  • 62
  • 1
  • 7
0
votes
2 answers

ASP.NET GridView Empty After Dynamic Fill From VB.NET

I have an ASP.NET GridView that is not being populated with new rows from a VB.NET Fill. The most recent incarnation of the code I am working with is as follows: Protected Sub uGV(ByVal sender As Object, ByVal e As System.EventArgs) Handles…
RGS
  • 77
  • 2
  • 9
0
votes
1 answer

DataAdapter.Update returning syntax error C#

void updateTaxPayer() { DataRow[] ssnRow = dbSet.Tables["TrackingSheet"].Select("SSN = '" + ssn + "'"); ssnRow[0]["HAS SPOUSE"] = checkboxToString(chkSpouse.CheckState); ssnRow[0]["SPOUSE SSN"] = txtSpouseSSN.Text; …
Anthony Abouhassan
  • 55
  • 1
  • 2
  • 10
0
votes
1 answer

Casting from ExecuteScalar on OleDbCommand in C#

I am receiving the following error from my code: The following errors occurred: System.Data.OleDb.OleDbException (0x80040E07): Data type mismatch in criteria expression. at…
Coder787
  • 1
  • 1
  • 1
0
votes
1 answer

Gridview not populating from access db with parameter query - VB

I have a page where I am trying to populate a gridview (gvClockings) on a button click based upon a selection in a dropdownlist (cbLocation) and a from/to date entered into textboxes from a calendarextender (txtFrom and txtTo). I have tested the…
Jimsan
  • 305
  • 4
  • 22