Hi,
I have an SQL statement that I'm executing through OleDb, the statement is something like this:
INSERT INTO mytable (name, dept) VALUES (@name, @dept);
I'm adding parameters to the OleDbCommand like this:
OleDbCommand Command = new OleDbCommand();
Command.Connection = Connection;
OleDbParameter Parameter1 = new OleDbParameter()...
Is there any way of specifying a URI (rather than a physical path) as the "Data Source" parameter in an OleDB connection string, or the "Dbq" parameter in an ODBC connection string, such that the default ADO.Net providers will work with it?
I've tried file://, and it's a no go, so I just wanted to confirm whether or not this is possible...
Hi,
Im getting a strange syntax error when I run this in VB
SQLString = "UPDATE Login SET Password = '" + PasswordTextBox.Text + "'"
SQLString += " WHERE UserName = '" + UserNameTextBox.Text + "'"
The Username is checked before getting to this part and is definitly in the db.
It gives an exception saying syntax error ...
I have a website using ASP with an MS Access DB back-end for storing mainly blog posts. My company has a very long software approval process so I am stuck with what I have (i.e. I must use Access). I use server-side javascript to retrieve posts stored in the database using OLEDB calls. Everything works fine except that I cannot read any ...
I need to check in my program if the VFPOLEDB provider is installed/registered? I want to show a message and tell the user to download and install the provider. How do I check it in C#?
...
I'm writing a program that lets a user:
Connect to an (arbitrary) database that the user specifies
View all of the tables in that database in separate DataGridViews
Edit them in the program, generate random data, and see the results
Choose to commit those changes or revert
So I discovered the DataSet class, which looks like it's capa...
I have a query that is
ExcelQuery = "Update [Sheet1$] "
+"set CITIZEN_ID = #" + value
+ " where CITIZEN_ID = " + value;
As you can see, I'm essentially just prepending a "#" to the CITIZEN_ID field. value is a int/numeric value. So if I had "256" in the CITIZEN_ID column it would be converted to "#256"...
Hey gang,
I've having a problem with a VBScript connecting to an access MDB Database. My platform is Vista64, but the majority of resources out there are for ASP/IIS7.
Quite simply, I can't get it to connect. I'm getting the following error:
800A0E7A - "Provider cannot be found. It may not be properly installed"
My code is:
Set conn ...
I have been pulling my hair out trying to figure out what I can't get parameters to work in my query. I have the code written in VB.NET trying to do a query to an AS/400. I have IBM Access for Windows installed and I am able to get queries to work, just not with parameters. Any time I include a parameter in my query (ex. @MyParm) it does...
I'm having problem creating Excel files using Jet. When I create a table and give it a Column name as
CreateTable [Sheet1] ([ColumnName#] String)
It replaces the header column with
ColumnName.
Is there a way I can make excel give the column headers a name with out any conflict in what characters I can have in it? Are there any esca...
Hi,
I have created a table on an Oracle 10g database with this structure :
create table myTable
(
id number(32,0) primary key,
myData clob
)
I can insert rows in the table without any problem, but when I try to read data from the table using OleDb connection, I get an exception.
Here is the code I use :
using (OleDbCon...
i wrote a module of a connection to DB with OleDB and the 'sub UpdateClients' doesn't work, the DB don't update.
what's missing or wrong?
this line -> "daClient.Update(dsClient, "CLUB_CLIENT")" -> dosen't work
(sorry about my english, i'm not so good)
the database doesn't update after this line (like i expected)
what's missing in ...
I'm looking for suggestions as well as any benchmarks or observations people have. We are looking to rewrite our data access layer and are trying to decide between native C++ OLEDB or ADO.NET for connecting with databases. Currently we are specifically targeting Oracle which would mean we would use the Oracle OLE DB provider and the OD...
I need to write a simple C# .NET application to retrieve, update, and insert some data in a Sharepoint list.
I am NOT a Sharepoint developer, and I don't have control over our Sharepoint server. I would prefer not to have to develop this in a proper sharepoint development environment simply because I don't want to have to deploy my appl...
When I read a sheet into a DataTable using the OleDbDataReader, floating point numbers loose their precision.
I tried forcing OleDb to read the excel data as string, but although the data is now contained in a DataRow with each Column defined as System.String it looses precision (18.125 -> 18.124962832).
Any idea how to avoid this beh...
I want to open an xlsx file, I have tried the below code,but neither does it open nor does it thrown any error.
Can anyone throw any light upon it
string path = "C:\\examples\\file1.xlsx";
string connString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES\";");
Ole...
I have a dataset and I write it's values to an excel file using Microsoft Jet 4.0 Oledb provider. I want to put hyperlinks into the excel, for this I write "=HYPERLINK("http://www.abc.org/x.pdf")" in DS and then write it to excel. But when the excel is opened it prefixes a ' (quote/apostrophe) before the formula and there it comes as a t...
I am using the following code to read my csv file:
public DataTable ParseCSV(string path)
{
if (!File.Exists(path))
return null;
string full = Path.GetFullPath(path);
string file = Path.GetFileName(full);
string dir = Path.GetDirectoryName(full);
//create the "database" connectio...
We need to be able to create a dBase database (.dbf file) containing numeric columns with specific width and precision. I seem to be able to set the precision but not the width. The following code shows my connection string and my command text.
using (OleDbConnection oConnection = new OleDbConnection(String.Format("Provider=Microsoft.Je...
I have an Excel sheet with two column, one is a number , and second column have a picture.
i want to read these data from c# with oledb connection, i can read number easily , but pictures is not contained in second column , so in c# i just get first column.
now, how can i read the images ? i want to extract the numbers and related image...