The using for the namespace is wrong. It was assumed the namespace would be Mono.Data.DB2Client, but it is DB2ClientCS. If you look in DB2ClientConnection.cs, it has a namespace of DB2ClientCS.
So, replace: using Mono.Data.DB2Client; with: using DB2ClientCS; Also, you need to make sure your DSN, UID, and PWD is set correctly in the connection string. To build on Windows: $ mcs.bat db2example.cs /r:System.Data.dll /r:Mono.Data.DB2Client.dll To build on Linux: $ mcs db2example.cs /r:System.Data.dll /r:Mono.Data.DB2Client.dll To run: $ mono db2example.exe -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Chris Sent: Saturday, March 08, 2003 10:42 PM To: [EMAIL PROTECTED] Subject: [Mono-list] Help Please - Building on Windows Hi, I've been developing the DB2Client driver with Microsoft Visual Studio. Finally, belatedly, I want to see how things are running under Mono itself, so I'm playing around with the Windows version on W2K (.21 and .22) levels. I'm trying to compile the simple test app that is on the db2 driver web page, and I can't get it to go...:( What the heck am I doing wrong here? My compile command: D:\monoDev>mcs Test.cs -L D:\Mono-21\install\lib -r System.Data.dll -r Mono.Data.DB2Client.dll Test.cs(11) error CS0246: Cannot find type `DB2ClientConnection' Test.cs(12) error CS0165: Use of unassigned local variable `dbcon' Compilation failed: 2 error(s), 0 warnings My Environment, the relevent part anyway (let me know if something is missing): MONOARGS= Test.cs -r System.Data.dll MONO_BASEPATH=d:\mono-0.21\install MONO_CFG_DIR=D:\mono-0.21\install\etc\mono MONO_PATH=D:\mono-0.21\install\lib NUMBER_OF_PROCESSORS=1 OS=Windows_NT Os2LibPath=C:\WINNT\system32\os2\dll; Path=D:\mono-0.21\install\bin;G:\mono-0.21\install\lib; e:\PROGRA~1\Borland\CBUILD~1\Projects\Bpl;e:\PROGRA~1\B orland\CBUILD~1\Bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;E:\PRO GRA~ 1\IBM\SQLLIB\BIN;E:\PROGRA~1\IBM\SQLLIB\FUNCTION;E:\PROGRA~1\IBM\SQLLIB\SAMP LES\ I think I'm picking up System.Data.Dll, but not Mono.Data.DB2Client.dll. Can anyone see what I'm doing wrong here? Thanks Chris _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
