Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC dsn problem
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sushil kumar bagi
dsn problem
1 Answer(s)      6 years and 2 months ago
Posted in : JDBC



Advertisement
View Answers

August 29, 2008 at 2:46 PM


Hi friend,


Some points to remember to create dsn (jdbc):

1.Create an ODBC DSN
Using the Windows Control Panel, create an ODBC DSN (data source name) for the database.

2.Load the driver
To load the JDBC driver by calling the forName() static method of the Class class. forName() takes one string parameter
JDBC-ODBC Bridge, this string is "sun.jdbc.odbc.JdbcOdbcDriver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

3.Establish a database connection
Once the JDBC driver loads, you can establish a connection to the database using the DriverManager.getConnection() method.

4.A connection to the database could be established in this manner:
String url= "jdbc:odbc:myDSN"; //

5.Connection connection = DriverManager.getConnection(url, "", "");

For read more information :

http://www.roseindia.net/jdbc/

Thanks


Related Tutorials/Questions & Answers:
dsn problem - JDBC
dsn problem  dear sir , my name is sushil kumar sir please tell me how to create dsn (jdbc ) at run time . when we will give our project to client then any code by which dsn will allready create at client computer
dsn - JDBC
done our project with dsn name "hms"; and after that when we will give to client then it is only way to access the database by using create a dsn from controle panel to client computer by manual. or any other way to set dsn at client side
Advertisements
Unable to Create DSN for
Unable to Create DSN for   I have installed Oracle 11g R2 and JDK7 in my Computer (Windows 7 Ultimate x64) . And, I want to work with Type 1 JDBC Driver. I'm unable to crate DNS for "Microsoft ODBC for Oracle", It gives eror
connect database without specifying dsn name in java
connect database without specifying dsn name in java  How can i connect the database with my application without specifying the dsn name by using jdbc & odbc..... i have saw this code on the web-site try
adding DSN in Data Sources - JSP-Servlet
adding DSN in Data Sources  I have added DSN the way you have told and it has been added in the data sources as online_exam is shown in the ODBC Database Administrator dialog box. But still code gives the following exception
the specified dsn contains an architecture mismatch between the driver and application windows 7
the specified dsn contains an architecture mismatch between the driver and application windows 7  sir, i m using windows 7 64-bit , 32-bit java...--- the specified dsn contains an architecture mismatch between the driver
the specified dsn contains an architecture mismatch between the driver and application windows 7
the specified dsn contains an architecture mismatch between the driver and application windows 7  Hi, While developing a JDBC program...: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture
Problem in my code - Development process
Problem in my code  Plz go thru this code. I want to check login and pwd with database. Backend MsAccess , Table name : Reg , Dsn Name: JJ While executing code am getting 404 error User Name Password
problem in onlinetest...
problem in onlinetest...  hi, my code getting the problem is ,when user leave a question then the server puts error... pls help me
problem in jsp using ms-access
problem in jsp using ms-access  after starting server(tomcat) wen v...)Your DSN will get created. 6) Restart your server and run your jsp code. Here... DSN.   Follow these steps: 1)Go to the start>>Control Panel>
javascript problem
javascript problem  hi guys My problem is that I am using radio button for yes or no but i want to do that if I press yes button then enter... enter please help me this problem
problem in validation
problem in validation  sir/madam, i m using struts-1.3.10. i m getting a problem my properties file is not found.... while i hav configuired it in struts-config.xml file, like thanks n regards himanshu
Problem with loginbean.jsp
Problem with loginbean.jsp  http://www.roseindia.net/jsp/loginbean.shtml - I am getting an error in loginbean.jsp.There is some error regarding .What is hello in this? Also in this example how
problem on strings
problem on strings  in string1 "123456 ABC DEF...",IN string2 "raveen". iwant to add string2 after 123456 in the first string based on index number.i need logic for this with out using StringBuffer concept. Thanks in advanace
problem with package
problem with package  Dear sir, i have created one java file with package com.net; and i compiled the program.it showing the .class file in " net" folder.The problem is i want to use that .class file in some other
Problem with cookies
Problem with cookies  Hello All, i need jsp code for RememberMe module of login. i am facing problem with cookies. so please if any one could guide me please help and provide mme the exact code.   Please visit
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot... havenot set the build path.if this is the problem then tell me how to set
compilation problem
compilation problem  struts 2.0 : i have included all 5 jars in lib folder,but its giving compilation problem that package open symphony doesnot... havenot set the build path.if this is the problem then tell me how to set
Oracle9i Problem
Oracle9i Problem  Hi I have a problem in Oracle9i .I have... the table what i created .But after closing the SQL+ ,the problem started.When i... .....;.it is saying no rows are selected.Why the problem arised in not getting the data that i
URL problem
URL problem  Hi. I have created a webpage for my project website. in that i have used frameset to split the page. Now if i click any link in the page its navigating to the another page. but the problem is here in the url its
problem on php
problem on php   l have five tables and build them as forms and link between them php and database and i want to build query between them plz help me soon   PHP MySQL Tutorials
JScrollBar Problem...
JScrollBar Problem...  Hello Sir/mam, Can i know how to use JScrollBar to JFrame without adding any JPanel to it.. i want to add JScrollBar Directly to JFrame... Please Provide me Simple Example so i can understand
problem with session.invalidate()
problem with session.invalidate()  i stuck by a line with "session.invalidate()", after user logout also by pressing the back button of the browser user is still able to navigate to his home page and able to view the session
Problem in Array
Problem in Array  Hi, Can you help me with this problem? Run a program that check if the input string contains equal number of A's and B's. Hoping for your answer.Thank you.   Here is an example that check
Skyline Problem
is the line tracing the largest y value from any rectangle in S The Problem: Write.... Your method should solve the problem three different ways; each solution
HttpSession problem :(
HttpSession problem :(  i want to ask that do i need to define httpsession in every servlet or jsp in my web application? if yes, then on which servlet? the very first one like my welcome page which comes after login page
 

 

 

DMCA.com