Abrir .dbf

19/08/2004 - 19:40 por Alberto | Informe spam
Intento abrir un .dbf de la siguiente forma y me tira este mensaje : "The
Microsoft Jet database engine could not find the object 'archivo.dbf'. Make
sure the object exists and that you spell its name and the path name
correctly."

OleDbConnection cnn = new OleDbConnection();
OleDbDataAdapter da = new OleDbDataAdapter();
OleDbCommand cmd;
DataSet ds = new DataSet();
try
{
cnn.ConnectionString "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source= c:\Carpeta\";" +
"Extended Properties=dBASE IV;" +
"User ID=Admin;Password=";
cmd = new OleDbCommand("select * from archivo.dbf", cnn);
da.SelectCommand = cmd;
da.Fill( ds );
return ds;

Alguien sabe donde puede estar el error? Obviamente que el archivo esta ahi.
(c:\carpeta\archivo.dbf)

Gracias.
 

Leer las respuestas

#1 Anonimo
20/08/2004 - 22:26 | Informe spam
El error esta aca ..

cmd = new OleDbCommand("select * from archivo.dbf", cnn);

te sobre el .dbf solo es "select * from archivo"

Saludos Cesar

Intento abrir un .dbf de la siguiente forma y me tira


este mensaje : "The
Microsoft Jet database engine could not find the


object 'archivo.dbf'. Make
sure the object exists and that you spell its name and


the path name
correctly."

OleDbConnection cnn = new OleDbConnection();
OleDbDataAdapter da = new OleDbDataAdapter();
OleDbCommand cmd;
DataSet ds = new DataSet();
try
{
cnn.ConnectionString >"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source= c:\Carpeta\";" +
"Extended Properties=dBASE IV;" +
"User ID=Admin;Password=";
cmd = new OleDbCommand("select * from archivo.dbf", cnn);
da.SelectCommand = cmd;
da.Fill( ds );
return ds;

Alguien sabe donde puede estar el error? Obviamente que


el archivo esta ahi.
(c:\carpeta\archivo.dbf)

Gracias.


.

Preguntas similares