I am writing an class using C++ (ATL).. I need to connect to a database. I am familiar with ADO but I see that all the functions are using IDispatch (late-binding/Automation). I am considering using OLEDB instead. What are the pros and cons of each? OLEDB seems like a lot of maintenance if the sql changes (tables, stored procs, etc). I d...
Does anyone know a good custom LINQ provider to query data from Excel spreadsheets?
...
Using the .NET Framework 2.0 on a computer with the LCID set to 1033, I am connecting to a Sybase ASE 12.5.4 server which has its default character set to sjis.
When I retrieve fields which contain Japanese text, I must, in code, convert each field from cp1252 to cp932 to display the text properly. However, when I set the computer to L...
Hi,
I am working on a project in Visual Studio 2008 (in vb.net). The app needs to import data from a Visual FoxPro database (dbc file). Do not ask why FoxPro. It needs to be vfp and the database is updated daily by another application; therefore, I cannot use any other database format.
I connect to the database through OleDb FoxPro dri...
I have an ADO.NET Managed Data Provider that is registered in machine.config in DbProviderFactory - It is available for use from, say, Analysis Services, so I know it is correctly registered.
However, I need to be able to query the managed provider from Excel, but the managed provider doesn't appear as a choice from Data Link Properties...
I have text files that are Tab delimited. I created a Schema.ini like so:
[MY_FILE.TAB]
Format=TabDelimited
ColNameHeader=False
Col1=id Short
Col2=data Text
This is the code I use to read it (C#):
using (var connection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\FolderToData\;Extended Properties='text;FMT=...
I'm using OLE to connect to a database using VB.NET, and show the results in a DataGridView.
I want to export the data that is in the DataGridView to an Excel format file, i.e., the user can save the content of the DataGridView as MS Excel file.
...
I have an application where we're using NHibernate and the NHibernate Jet Driver to open existing .MDB files (Access 2003 / Jet 4.0 databases), read some information and add some new records.
Unfortunately we have no control over the database format - so we're stuck having to support Jet.
The problem I'm facing is that when performing ...
Hello ,,
I used the following code to save what the user editing , the code don't give me any error code , but in the same time it don't do any thing , the data still without any new changes :
Dim a As String
a = comb3.Text & "/" & comb2.Text & "/" & comb1.Text
Dim SavInto As New OleDb.OleDbCommand
Dim ConStr A...
Hello ,
before a little time , I used a code to get the dates between 2 dates from the database (column with dates dd/mm/yy) , I think it works nice first time , the code is :
Dim b As New Date
Dim a As Integer
a = Val(tx2.Text)
b = System.DateTime.Today
b = b.AddDays(-a)
...
I'm using NHibernate with Burrow and Fluent to shuttle data from SQLServer2005 into a directory full of FoxPro 7 dbf's.
When I try to save a new record through Burrow's GenericDAO, I get an exception that boils down to "Field XXX does not accept null values," where field XXX is a NOT NULL field that is not being mapped at all because it...
Is there any way to access the prepared statement as sent to the SQL server?
Dim params(1) As OleDb.OleDbParameter
params(0) = New OleDb.OleDbParameter("@ID", OleDb.OleDbType.VarChar, 50)
params(0).Value = guiItemsGridView.Rows(e.RowIndex).Cells("ID").Value
params(1) = New OleDb.OleDbParam...
I create a table named "PathTable" in a MS-Access DB.
The table is like this:
------------------------------
| IP | Input | Output |
------------------------------
| 127.0.0.1 | XXXXX | YYYYYY |
------------------------------
When I programed these
String CommandString = "SELECT Input, Output FROM PathTable WHERE IP = '127.0.0...
Hello everyone i am new in wpf. so i have got problems with it. if you help me, i will be so pleased. thanks everyone in advance.
My problem is, can not insert into name inside database in wpf. how can i fix it? my codes as follows;
private void button1_Click(object sender, RoutedEventArgs e)
{
try
{
string SqlStr...
Is it possible to query an OleDB connection to find out if you must use square brackets or quotes?
SQL:
SELECT [FullName] From [My Users]
Oracle
SELECT "FullName" From "My Users"
MySQL:
SELECT `FullName` From `My Users`
...
I'm reading an Excel file with OLDB Connection using this code
var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", fileName);
var fileName = string.Format("{0}\\s23.xls", Directory.GetCurrentDirectory());
var adapter = new OleDbDataAdapter("SE...
In my code, why does nothing execute after con.Open(). If I step through each step, it ends the Form1_Load event after "con.Open()".
Imports System.Data.OleDb
Public Class Form1
Dim con As OleDbConnection
Dim strCon As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source=C:\testDB.accdb"
Private Sub Form1_Load(ByVal sender...
I am trying to run a program, running on the hard drive, that uses Microsoft Jet OleDB to open and get info from an MS Access database. The problem is that when I try to run the program Visual Studio gives me this error:
"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine."
I tried building the program to tar...
I created a windows application developed in .NET 3.5 in a 32 bit Windows 2008 server. When deployed the application in a 64 bit server it shows the error "Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine ".
So as a solution to this issue, i have changed the build property of the project to X86, so that it will b...
I retrieving data from a csv/txt file using oledb driver
ConnString = "Provider=Microsoft.Jet.OleDb.4.0; Data Source = " & System.IO.Path.GetDirectoryName(strFileName) & "; Extended Properties = ""Text;HDR=YES;FMT=Delimited"""
strQuery = "SELECT * FROM [" & System.IO.Path.GetFileName(strFileName) & "]"
In the last line I am getting ...