Sadly I cannot -- we use XADataSource and so I have no idea what a  
working JDBC URL is ;-)

I replicated what your script does in BeanShell and ran it against my  
running JBoss instance, so hopefully it's sufficient:

conn = com.paytronix.server.api.common.ServiceLocator.get 
(com.paytronix.server.api.datasource.ConnectionService.class 
).acquireTransactionalConnection("foo", 1);
md = conn.getMetaData();
md.getDatabaseMajorVersion() + "," + md.getDatabaseMinorVersion() +  
"," + md.getDatabaseProductName();
//over
//output
//error
//encodingExceptions
//result
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_15" class="java.beans.XMLDecoder">
  <string>9,0,Microsoft SQL Server</string>
</java>
//over

Ignore the //* gunk -- it's part of the protocol we use for beanshell.

-Ross



On Oct 15, 2009, at 3:51 PM, Derek Chen-Becker wrote:

> Could you do me a favor and run the script to make sure that it  
> returns 9, 0? The Mapper code currently uses the separate major and  
> minor version numbers because other DBs (PG, for example), do have  
> different functionality between minor releases.
>
> Thanks,
>
> Derek
>
> On Thu, Oct 15, 2009 at 1:45 PM, Ross Mellgren <dri...@gmail.com>  
> wrote:
>
> I have SQL Server 2005 SP2 here, and it reports 9.00.3042. I did not
> run your script, this version comes from
> DatabaseMetaData.getDatabaseProductVersion.
>
> -Ross
>
>
> On Oct 15, 2009, at 3:38 PM, Derek Chen-Becker wrote:
>
> > I don't have access to any SQL Server instances, so I was wondering
> > if someone out there who does could help me. In order to do some
> > version-specific behavior in Mapper/Schemifier, I need major and
> > minor version numbers for SQL Server. I've been googling around, and
> > I found this doc:
> >
> > http://support.microsoft.com/kb/321185
> >
> > I would like to confirm that the major and minor versions returned
> > in the JDBC metadata matches this document. The attached Scala
> > script can be run to get the major and minor versions from a
> > particular JDBC connection. Just run it like:
> >
> > $ scala -cp <your jdbc driver JAR here> JDBCVersioner.scala <JDBC
> > url> <user> <pass>
> >
> > If you can let me know what the values returned are for your
> > instance, and what the "official" name of your version is, that
> > would help me a lot.
> >
> > Thanks!
> >
> > Derek
> >
> > >
> > <JDBCVersioner.scala>
>
>
>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to