michael112
Goto Top

C sharp Datenbank verbindung zu Dbase III oder Dbase IV über VFPOLEDB

Hallo Zusammen
ich schreibe ein kleines Programm in C# welches Daten aus der Datenbank eines anderen Programms auslesen soll.
Die Verbindung kann aber nicht geöffnet werden

derzeit sieht mein code so aus:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Configuration;
using System.IO;
using System.Data.Odbc;
using System.Data.OleDb;



public void Datenzugriff()
{
string connectionstring = @"Provider=VFPOLEDB.1;Data Source = ARTIKEL.DBF;Extended Properties=dBase III"; //VFPOLEDB muss installiert werden

OleDbConnection cnn = new OleDbConnection(connectionstring);


try
{
cnn.Open();
MessageBox.Show("Connection Open ! ");
cnn.Close();
}
catch (Exception ex)
{
MessageBox.Show("Can not open connection ! ");
}

Content-Key: 368027

Url: https://administrator.de/contentid/368027

Printed on: April 19, 2024 at 22:04 o'clock

Member: Pjordorf
Pjordorf Mar 14, 2018 updated at 17:13:54 (UTC)
Goto Top
Hallo,

Zitat von @michael112:
Die Verbindung kann aber nicht geöffnet werden
Sagt wer oder was und wo und mit welchem genauen Wortlaut oder Fehlernummer?
Vielleicht hilfts https://support.microsoft.com/de-de/help/505943

Gruß,
Peter
Member: michael112
michael112 Mar 15, 2018 at 11:14:58 (UTC)
Goto Top
Hallo Pjodorf,
ich bekomme den Error

system.data.oledbexception 0x80004005 File 'gerpbk.prg' does not exist

Gruß
Michael
Member: Pjordorf
Pjordorf Mar 15, 2018 updated at 11:31:00 (UTC)
Goto Top
Hallo,

Zitat von @michael112:
system.data.oledbexception 0x80004005 File 'gerpbk.prg' does not exist
Meintest du system.data.oledb exception?
https://msdn.microsoft.com/de-de/library/system.data.oledb.oledbexceptio ...
https://msdn.microsoft.com/en-us/library/6y8t7kbw.aspx

System und Umgebung passt?

Gruß,
Peter