Questions tagged [oledbcommand]

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

417 questions
-1
votes
1 answer

OleDbCommand ExecuteNonQuery() performance issues

I'm currently trying to write a huge amount of datasets to an access database. Unfortunately command.ExecuteNonQuery() seems to be very slow and I'm looking for a faster approach. I've been measuring the execution time of all parameter adds, but one…
Xentrax
  • 71
  • 7
-1
votes
2 answers

Join tables from different databases (ADO.NET)

I have two databases and a UDL connection string to each one. I'd like to construct a query that joins tables from both databases. I'm doing a query from a single database like this. string query = "..."; using (OleDbConnection connection = new…
Jonathan Wood
  • 59,750
  • 65
  • 229
  • 380
-1
votes
2 answers

VB.Net Access Query Stop Rounding Decimal to Integer

i am using OleDbCommand for importing CSV when i am using query its rounding the decimal to integer. For Example My Table Data is Below SalID Commission 1 2.5 1 2.5 My Access query is select salID, Comission from table…
Allex
  • 141
  • 1
  • 14
-1
votes
1 answer

Getting a syntax error with INSERT INTO statement

I'm receiving the error of "C# Syntax error in INSERT INTO statement" for this part of code below: public static void SaveCurrentPlaylistToSheet(YouTubeVideo[] CurrentPlaylist, string playlistTitle) { ActiveSheetTitle = "Test"; //playlistTitle; …
Amitai Weil
  • 59
  • 2
  • 8
-1
votes
2 answers

Im trying to INSERT data on a database with VB

I'm trying to Insert data on a access DataBase using Visual Basic with OleDbCommand, but it keeps returning me this error: Here's my code: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click …
-1
votes
2 answers

INSERT INTO Table (Column) VALUE (email)

I want to insert email in Table with only one column. I tried on 2 way. First time I tried with commandText and second time I tried with parapeters. But the both solution give me the same error. System.Data.OleDb.OleDbException: 'Syntax error in…
MiOnIs
  • 125
  • 12
-1
votes
1 answer

Selecting a range of, or the first x, columns with OleDb

Assume I have an Excel document with a single sheet in it. Where there is data in columns A-G, I can select all of them simply by using "SELECT * FROM [" + sheetname + "]". However, what if I want to specify columns? If there only happens to be a…
Wolfish
  • 902
  • 1
  • 7
  • 30
-1
votes
1 answer

C# OleDb Insert Integer with Parameter

I have a problem with insert command in C# WinForm. I need to insert special char so I need parameter or some alternative. But I can't insert the data into db. My 2nd column RecordNo allows unique and is a integer. This is where I'm facing trouble.…
Roshan
  • 83
  • 10
-1
votes
2 answers

SELECT COUNT Query Error

I've got this code, I'm trying to count Rows with specific payrollno in an accessdatabase datatable [Holiday]. string CountHolidayQuery = "SELECT COUNT FROM [Holiday] WHERE PayrollNo = @PayrollNo"; var CountHoliday = new…
Josh
  • 115
  • 3
  • 15
-1
votes
1 answer

An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'

I am using Oledb connection for database connectivity but i am getting error be sure i am not using SQL server i am using Microsoft access 2013
Khawar Islam
  • 1,748
  • 21
  • 29
-1
votes
1 answer

Syntax error in UPDATE statement. via cmd.nonexecutequery

If Me.TextBox1.Tag & "" = "" Then cmd.CommandText = "INSERT INTO Table1(CandidateID, Fname, Mname, Lname, Partylist, Pst, course) " & _ " VALUES (" & Me.TextBox1.Text & ", '" & Me.TextBox2.Text & "', '" & Me.TextBox3.Text & "', '" & _ …
-1
votes
2 answers

Copy Records From Access Table To Access Table

In C# I am trying to insert records from one access table to another access table, but I get the above error message. What is causing this error (OleDbException: No value given for one or more required parameters) as it is a straight Select *…
user2676140
  • 1,203
  • 2
  • 14
  • 30
-1
votes
2 answers

OleDbCommand, No value given

With an Access table (Customers) and two fields (CustomerID, CustomerName): string queryString = "INSERT INTO Customers (CustomerID, CompanyName) VALUES (qqq, xyz)"; OleDbCommand command = new OleDbCommand(queryString,…
bhs67
  • 83
  • 1
  • 4
-1
votes
1 answer

Insert syntax error in oledbconnection

What is the problem in this code? for (int i = 1; i <= kalanum; i++) { foreach (Control ctr in panel1.Controls) { if (ctr is TextBox && ctr.Name == i.ToString()) { int kalaid =…
-1
votes
1 answer

oledbcommand executenonquery access update error

when i run this code it shows error, please help me! `int code = int.Parse(tbxcode.Text); string name = tbxname.Text; string description = tbxdescription.Text; bool active = true; int idcompany = cbxcompany.SelectedIndex; string kala =…
sepehr2121
  • 89
  • 8
1 2 3
27
28