We can create DSN for type 1 driver in windows 7 OS using 2 ways
Reason
The above problem occurs when you install oracle(Database) 32 bit version in 64 bit Windows 7 OS.
While trying to find out the Solution,I came across once possible solution for this.
If you have installed 64 bit Oracle , then 1st approach should work.
If you have installed 32 bit Oracle , then you must use 2nd approach to create the dsn.
Lets say you have developed a jdbc Application InsertTest.java which contains type1 driver to interact with database.
To compile the Application,we use javac *.java
To execute the Application we use java InsertTest
Please Note: when we launch command prompt to compile and execute java application,we get the command prompt available at c:\windows\system32\cmd.exe which is a 64 bit,and you are trying to interact with 32-bit oracle database.
Please Note: We also have a command prompt available at c:\windows\syswow64 folder
c:\windows\syswow64\cmd.exe. This is 32 bit command prompt.If you activate this command prompt and compile and execute your java application,This time 32 bit compiled java class will interact with 32 bit oracle DB,and you wont get any exception
Lets assume the location of JDBC Type 1 Driver as c:\App1\InsertTest.java
Steps:
1.open command prompt
2.Activate 32bit command prompt located at c:\windows\syswow64\cmd.exe
3.This will launch 32 bit command prompt
4.Now compile and execute your Application
- Goto control panel and create dsn,
- launch C:\Windows\SysWOW64\odbcad32.exe
Reason
The above problem occurs when you install oracle(Database) 32 bit version in 64 bit Windows 7 OS.
While trying to find out the Solution,I came across once possible solution for this.
If you have installed 64 bit Oracle , then 1st approach should work.
If you have installed 32 bit Oracle , then you must use 2nd approach to create the dsn.
Lets say you have developed a jdbc Application InsertTest.java which contains type1 driver to interact with database.
To compile the Application,we use javac *.java
To execute the Application we use java InsertTest
Please Note: when we launch command prompt to compile and execute java application,we get the command prompt available at c:\windows\system32\cmd.exe which is a 64 bit,and you are trying to interact with 32-bit oracle database.
Please Note: We also have a command prompt available at c:\windows\syswow64 folder
c:\windows\syswow64\cmd.exe. This is 32 bit command prompt.If you activate this command prompt and compile and execute your java application,This time 32 bit compiled java class will interact with 32 bit oracle DB,and you wont get any exception
Lets assume the location of JDBC Type 1 Driver as c:\App1\InsertTest.java
Steps:
1.open command prompt
2.Activate 32bit command prompt located at c:\windows\syswow64\cmd.exe
3.This will launch 32 bit command prompt
4.Now compile and execute your Application
No comments:
Post a Comment