This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic