• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Hot to use File DSN make connection?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey
Are you sure you created this DSN using the win ODBC data sources configuration tool?
regards
ravee.
 
Eric Wang
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic