Menu

#4 MS Access with ArrowHead ASP Server

v0.0.2
open
General (4)
5
2006-12-15
2006-12-15
Anonymous
No

Can i use MS Access as DB for ASP pages in ArrowHead ASP Server.

It is throwing the following error:

java.sql.SQLException: The url cannot be null
at java.sql.DriverManager.getConnection(DriverManager.java:489)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at com.tripi.asp.ADODB.Connection.Open(Connection.java:249)
at com.tripi.asp.ADODB.Connection.Open(Connection.java:266)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.tripi.asp.JavaObjectNode$JavaFieldNode.executeMethod(JavaObjectNode.java:574)
at com.tripi.asp.JavaObjectNode$JavaFieldNode.execute(JavaObjectNode.java:353)
at com.tripi.asp.GetIndexNode.execute(GetIndexNode.java:178)
at com.tripi.asp.BlockNode.execute(BlockNode.java:155)
at com.tripi.asp.AspThread.run(AspThread.java:79)
at java.lang.Thread.run(Thread.java:534)
File C:\jakarta-tomcat-5.0.19\webapps\aspfiles\test.asp line 12: java.sql.SQLException: The url cannot be null
File C:\jakarta-tomcat-5.0.19\webapps\aspfiles\test.asp line 12: java.sql.SQLException: The url cannot be null

Discussion

  • Nobody/Anonymous

    Sample File with AS

     
  • Terence Haddock

    Terence Haddock - 2006-12-15

    Logged In: YES
    user_id=1206
    Originator: NO

    Hi, ArrowHead uses the Java JDBC layer to talk to databases, and doesn't understand the Microsoft connection string you are using. To talk to a Microsoft Access database on Windows (this doesn't work from Linux) first create an ODBC data source (Configuration Panel, ODBC, System DSN) , and call it something meaningful like "aikya".

    Then, you can use a connection string such as:

    Con.Open("DRIVER=sun.jdbc.odbc.JdbcOdbcDriver;URL=jdbc:odbc:aikya")

    If that doesn't work, try this:

    Con.Open("DRIVER=sun.jdbc.odbc.JdbcOdbcDriver;jdbc:odbc:" &_
    "Driver={Microsoft Access Driver (*.mdb)};DBQ=" &_
    Server.MapPath("aikya.mdb") & ";DriverID=22;READONLY=true}

    Unfortunately, I have no way to test these connection strings myself, you could also try entering your ADODB connection string in there after jdbc:odbc: . Let me know what works, and I could improve ArrowHead to do jdbc:odbc by default.

     

Log in to post a comment.

MongoDB Logo MongoDB