To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=107601
                 Issue #|107601
                 Summary|Problem opening MSSQL tables via unixODBC with uniquei
                        |dentifier as primary key
               Component|Database access
                 Version|OOo 3.1.1
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|none
             Assigned to|dbaneedsconfirm
             Reported by|jkstrick





------- Additional comments from [email protected] Thu Dec 10 16:28:13 
+0000 2009 -------
I am trying to open tables in an MSSQL database from OO.o Base via unixODBC, 
but when I try, I get the following error:

    The data content could not be loaded.

    [unixODBC][Driver Manager]Invalid cursor state

I also get the same error if I run a query as "SELECT * FROM MyTable".

However, if I run the query as "SELECT ID, Field1, Field2 FROM MyTable", 
including all of the fields from the table, the query runs.

Also, if I run "SELECT * FROM MyTable" with "Run SQL Command Directly" 
selected, it also works.

So, I ran the SQL Server profiler on the "SELECT * FROM MyTable" query, 
without "Run SQL Command Directly", and the following queries show up:
--
    declare @p1 int
    set @p1=1
    exec sp_prepare @p1 output,N'@P1 varchar(80)',N'SELECT * FROM "MyTable"
        WHERE "MyTable"."ID" = @P1',1
    select @p1
--
    declare @p1 int
    set @p1=2
    exec sp_prepare @p1 output,N'@P1 BINARY(1)',N'SELECT * FROM "MyTable"
        WHERE "MyTable"."ID" = @P1',1
    select @p1
--

I'm not sure what OO.o Base is trying to do here, but trying to compare a 
uniqueidentifier field with INT doesn't seem to be working.  Also, I'm not 
convinced that this isn't an issue with unixODBC or FreeTDS.

OO.o 3.1
unixodbc 2.2.11
freetds 0.82

Thanks!

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to