Re: Error using ODBC on XP but it works on Win Server 2003!
From: AndreB (news_at_abj.fr)
Date: 02/21/04
- Next message: Dmitri Ivanov: "Re: ODBC Autonumber"
- Previous message: Zed: "ODBC Autonumber"
- In reply to: Andre B: "Error using ODBC on XP but it works on Win Server 2003!"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 21 Feb 2004 22:18:39 +0100
I found the error. It's due to BDE 3.51 and BDE 5.10 installed from Borland.
It conflicts with odbc files.
The solution is to rename temporarily the following folder:
"C:\Program Files\BORLAND\COMMON FILES\Bde" to any name
"C:\Program Files\BORLAND\COMMON FILES\BdeTemp"
AndreB.
"Andre B" <andre.birrochon@wanadoo.fr> a écrit dans le message de
news:OqkUdw89DHA.2532@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> I'm quite beginning with VS .NET 2003.
>
> On Windows XP, I experience a problem with the following error message:
> {"La référence d'objet n'est pas définie à une instance d'un objet." }
which
> I translated:
> {"Object reference is not defined to (as) an object instance."}
>
> But when I run it on a Windows Server 2003, it works perfectly.
>
> Here is the code:
>
> string VarConnection = @"Driver={Microsoft dBASE Driver
> (*.dbf)};DriverID=277;Dbq=D:\C#Abj\WAR\dossier;";
>
> MyConnect = new OdbcConnection(VarConnection);
> MyConnect.Open();
>
> string OrdreSQL = "CREATE UNIQUE INDEX TOTO ON A20ESSAI(CCODE);";
>
> try
> {
> OdbcCommand MyCommand = new OdbcCommand(OrdreSQL,MyConnect);
> MyCommand.ExecuteNonQuery();
> }
> catch(Exception e)
> {
> throw e;
> }
>
> If anyone could help me, I would very much appreciate.
>
> Thanks, AndreB.
>
>
- Next message: Dmitri Ivanov: "Re: ODBC Autonumber"
- Previous message: Zed: "ODBC Autonumber"
- In reply to: Andre B: "Error using ODBC on XP but it works on Win Server 2003!"
- Messages sorted by: [ date ] [ thread ]