Hi: I hava a file DSN link to my Access database is named as web.dsn ______________ [ODBC] DRIVER=Microsoft Access Driver (*.mdb) UID=admin UserCommitSync=Yes Threads=3 SafeTransactions=0 PageTimeout=5 MaxScanRows=8 MaxBufferSize=2048 FIL=MS Access DriverId=25 DefaultDir=D:\ DBQ=D:\webfriends.mdb _______________________ 1. So how should I use web.dsn, will it work using this way? 2. And if it works, where should I put the web.dsn file? 3. I have try this code, but it won't work, why? Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc dbc:web.dsn", "", ""); Thank you. Eric
Hey Are you sure you created this DSN using the win ODBC data sources configuration tool? regards ravee.
Eric Wang
Greenhorn
Joined: Dec 21, 2000
Posts: 22
posted
0
Hi Ravee: Thank you the reply first. Yes, I use the win ODBC to create my web.dsn file. Does it anywrong in the file. cheers Eric
maha anna
Ranch Hand
Joined: Jan 31, 2000
Posts: 1467
posted
0
Eric, Which platform are you using? Win NT or Win 98? In win 98, StartMenu....>Settings..>ControlPanel...>click on ODBC Data Source(ICON)....>UserDSN(Tab)...>Add...>Select MicroSoft Access Driver(*.mdb)....>Click on Finish....>Type Data Source Name Eg. AMSDatabase....> click on Select...>Browse to your .mdb file ...>Click on OK Did you do this procedure ? regds maha anna