Re: Driver.getPropertyInfo() returns inconsistent array



Ok.

The code you have tested with is the exact same as we have but we get nulls
after a while. It appears it has been fixed in the latest drop you are using
so I am perfectlyl fine with that. Thanks!

Roger

"Angel Saenz-Badillos[MS]" wrote:

> Yes, I am sorry I am actually talking about the latest internal drop. The
> driver is slated to ship this month but if you feel that there may still be
> a bug here (If the code that I provided is not what you are using) I would
> be happy to work with you to get this resolved.
>
> --
> Angel Saenz-Badillos [MS] DataWorks
> This posting is provided "AS IS", with no warranties, and confers no
> rights.Please do not send email directly to this alias.
> This alias is for newsgroup purposes only.
> I am now blogging: http://weblogs.asp.net/angelsb/
>
>
>
>
> "roger" <roger@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:C3335085-598D-4CC4-BEC6-F14D3156AD39@xxxxxxxxxxxxxxxx
> > Angel,
> >
> > Great!
> >
> > I assume the "latest drop" is newer then the driver we've tried with?
> >
> > Regards
> >
> > Roger
> >
> > "Angel Saenz-Badillos[MS]" wrote:
> >
> >> Thank you for reporting this issue. I have just tried the following code
> >> in
> >> the latest drop of our driver and it looks like it does not have this
> >> problem.
> >>
> >> Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
> >> Driver Driver1 = DriverManager.getDriver("jdbc:sqlserver://");
> >> DriverPropertyInfo[] infoArray =
> >> Driver1.getPropertyInfo("jdbc:sqlserver://", new Properties());
> >>
> >> System.out.println(infoArray.length);
> >> for (int i=0;i < infoArray.length ;i++){
> >> System.out.print("NAME = "+ infoArray[i].name);
> >> System.out.print(". VALUE = " + infoArray[i].value);
> >> System.out.println(". DESCRIPTION = " + infoArray[i].description);
> >> }
> >>
> >> output:
> >> 16
> >> NAME = user. VALUE = null. DESCRIPTION = User name
> >> NAME = password. VALUE = null. DESCRIPTION = Password
> >> NAME = databaseName. VALUE = null. DESCRIPTION = Database to connect to
> >> NAME = serverName. VALUE = null. DESCRIPTION = The host to connect to
> >> NAME = portNumber. VALUE = 1433. DESCRIPTION = The SQL Server port
> >> NAME = sendStringParametersAsUnicode. VALUE = true. DESCRIPTION = Send
> >> prepared string parameters as Unicode
> >> NAME = applicationName. VALUE = Microsoft SQL Server 2005 JDBC Driver.
> >> DESCRIPTION = Set the application name for profiling
> >> NAME = lastUpdateCount. VALUE = true. DESCRIPTION = Ensure that only the
> >> last update count from an update or insert is returned
> >> NAME = disableStatementPooling. VALUE = true. DESCRIPTION = Disable
> >> statement pooling
> >> NAME = integratedSecurity. VALUE = false. DESCRIPTION = Integrated
> >> security
> >> NAME = lockTimeout. VALUE = -1. DESCRIPTION = Set the lock timeout
> >> NAME = loginTimeout. VALUE = 0. DESCRIPTION = Set the login Timeout
> >> NAME = instanceName. VALUE = null. DESCRIPTION = Set the Instance Name
> >> NAME = xopenStates. VALUE = false. DESCRIPTION = Set the SQLException
> >> state
> >> to XOPEN mode
> >> NAME = selectMethod. VALUE = direct. DESCRIPTION = Enable Serverside
> >> cursors
> >> NAME = workstationID. VALUE = null. DESCRIPTION = Host name of the
> >> workstation
> >> --
> >> Angel Saenz-Badillos [MS] DataWorks
> >> This posting is provided "AS IS", with no warranties, and confers no
> >> rights.Please do not send email directly to this alias.
> >> This alias is for newsgroup purposes only.
> >> I am now blogging: http://weblogs.asp.net/angelsb/
> >>
> >>
> >>
> >>
> >> "roger" <roger@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> >> news:E0EBBDE9-4EFA-4AEF-AFF6-D125D51F07FA@xxxxxxxxxxxxxxxx
> >> > Hi,
> >> >
> >> > We are testingn our DbVisualizer tool with:
> >> >
> >> > Microsoft SQL Server 2005 JDBC Driver - Beta 2
> >> > Version: 1.0.419.102
> >> >
> >> > The problem is that Driver.getPropertyInfo() method seems to return
> >> > an array with less elements then being reported by the length
> >> > attribute.
> >> > Looping over the array using its length results in a
> >> > NullPointerException
> >> > if not checking that the actual value is not null.
> >> >
> >> > Our tests shows that length reports 25 while there are only 17 elements
> >> > in the array.
> >> >
> >> > It is easily fixed on our side but I thought you might be interested in
> >> > knowing this.
> >> >
> >> > Regards
> >> >
> >> > Roger Bjärevall
> >> > Minq Software
> >>
> >>
> >>
>
>
>
.



Relevant Pages

  • Re: My first driver
    ... Please do not send e-mail directly to this alias. ... newsgroup purposes only. ... puts it into the driver to detect the "special" pattern. ... inspect this "other" buffer and use it for it's intended purpose. ...
    (microsoft.public.development.device.drivers)
  • Re: My first driver
    ... Please do not send e-mail directly to this alias. ... newsgroup purposes only. ... puts it into the driver to detect the "special" pattern. ... inspect this "other" buffer and use it for it's intended purpose. ...
    (microsoft.public.development.device.drivers)
  • Re: about win32k.sys
    ... Please do not send e-mail directly to this alias. ... newsgroup purposes only. ... This posting is provided "AS IS" with no warranties, ... But i want to make a universal video driver in kernel mode that base on ...
    (microsoft.public.development.device.drivers)
  • Re: could WDM sample code: selsusp work on any platform?
    ... Please do not send e-mail directly to this alias. ... newsgroup purposes only. ... source that have easily moved to kmdf. ... KMDF changes how the driver ...
    (microsoft.public.development.device.drivers)
  • Re: USB to Serial Port && Kernal BSODs
    ... Please do not send e-mail directly to this alias. ... >> newsgroup purposes only. ... The driver for this cable ... >>> caused by drivers that have corrupted the system pool. ...
    (microsoft.public.win32.programmer.kernel)

Loading