[ psqlodbc-Bugs-1000630 ] Related to bug GenerateBDDirectMethod fails in VS studio 2005 with ODBC

[ psqlodbc-Bugs-1000630 ] Related to bug GenerateBDDirectMethod fails in VS studio 2005 with ODBC

am 03.06.2006 05:14:06 von noreply

Bugs item #1000630, was opened at 2006-05-04 06:17
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10006 30&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Patrick Donelan (patspam)
Assigned to: Ludek Finstrle (luf)
Summary: Related to bug GenerateBDDirectMethod fails in VS studio 2005 with ODBC

Initial Comment:
This bug is related to the bug "GenerateBDDirectMethod fails in VS studio 2005 with ODBC" (http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000 540&group_id=1000125)

I am posting as a new bug because pgFoundry wouldn't let me attach my logs as a commenter.

I get the same problem with the latest version of the drivers: 8.02.00.02

I tried making changes to a TableAdapter inside the Visual Studio 2005 DataSet Designer and as a result the TableAdapter lost its automatically generated Update,Insert,Delete queries (GenerateBDDirectMethods).

I have found that if I try to re-create my TableAdapter it always comes back without the GenerateBDDirectMethods. If I try to change the GenerateBDDirectMethods property on my TableAdapter to true, it communicates with my database (PostgreSQL 8.1, running locally under Windows XP), then returns the following error:

The type of the database object does not allow to set GenerateDBDirectMethods to true.

Hopefully during this process the reason is written to the log files (both attached).

Simple Steps To Reproduce
-------------------------
1. Open an existing DataSet in the DataSet Designer (or create a new one)
2. Add a TableAdapter, with a simple query (in my case "SELECT * FROM agent")
3. VS will tell you that it generated everything ok, but when you look at the Properties on the TableAdapter you will see that GenerateDBDirectMethods is false.
4. Try changing GenerateDBDirectMethods to true and VS will throw the error above.

Hope that helps.

Regards,

Patrick

P.S. Sorry the mylog is so big. VS makes it grow really quickly. Not sure if that's normal or symptomatic of the bug. Let me know if you can't read 7-zip format. I tried zipping instead but the maximum compressed file was > 2Mb!

------------------------------------------------------------ ----------

>Comment By: Patrick Donelan (patspam)
Date: 2006-06-03 03:14

Message:
Hiroshi,

Sorry if the last logs didn't include the relevant
information. I think I've managed to capture it this time
(Visual Studio can be a strange beast).

Logs are attached (logs5.7z) using 7.3.0274.

Regards,

Patrick

------------------------------------------------------------ ----------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-05-31 04:18

Message:
Hmm I can't find a suspicious place at first glance. Could you retry the dll though I'm
not sure about the effect ?

regards,
Hiroshi Inoue

------------------------------------------------------------ ----------

Comment By: Patrick Donelan (patspam)
Date: 2006-05-30 05:39

Message:
Hiroshi,

I get the same behaviour with 7.3.0274.

Logs attached (logs4.7z).

Regards,

Patrick

------------------------------------------------------------ ----------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-05-29 16:42

Message:
Could you retry the latest dll(7.3.0274) at
http://www.geocities.jp/inocchichichi/psqlodbc/index.html
?

regards,
Hiroshi Inoue

------------------------------------------------------------ ----------

Comment By: Patrick Donelan (patspam)
Date: 2006-05-29 04:35

Message:
Luf, with your attached dll I can no longer complete the Add
Table Adapter Wizard. I get the error:

ERROR [HY000] Can't get column attributes: no result found

When I try changing GenerateDBDirectMethods to true on an
exiting Table Adapter I still get the same error as
originally posted.

Logs are attached (logs3.7z).

Regards,

Patrick

------------------------------------------------------------ ----------

Comment By: Patrick Donelan (patspam)
Date: 2006-05-29 04:27

Message:
I get exactly the same behaviour with Hiroshi's new dll
(dated 27/05/2006).

New Logs (logs2.7z) attached. Again, sorry about the large
mylog (98Mb).

Cheers,

Patrick

------------------------------------------------------------ ----------

Comment By: Hiroshi Inoue (hinoue)
Date: 2006-05-29 00:19

Message:
Could you try the latest dll at
http://www.geocities.jp/inocchichichi/psqlodbc/index.html
?
IIRC it contains a fix for "The cursor is open." error and also contains an improvement for the
implementation of SQLColAttribute which is often
called in the log.

regards,
Hiroshi Inoue

------------------------------------------------------------ ----------

Comment By: Ludek Finstrle (luf)
Date: 2006-05-28 12:25

Message:
This seems to be problematic:

[3528][SQLMoreResults]
[3528]PGAPI_MoreResults: entering...
[3528]PGAPI_MoreResults: returning 100
[3528][SQLSpecialColumnsW]
[3528]STATEMENT ERROR: func=SQLSpecialColumnsW, desc='', errnum=3, errmsg='The cursor is open.'
[3528]CONN ERROR: func=SQLSpecialColumnsW, desc='', errnum=0, errmsg='(NULL)'
[3528][[SQLGetDiagFieldW]] Handle=(3,15a49d60) Rec=1 Id=4 info=(12dda4,12)
[3528]PGAPI_GetDiagField entering rec=1[3528]ER_ReturnError: status = 3, msg = #The cursor is open.#
[3528] szSqlState = 'HY010',len=19, szError='(null)'
[3528]PGAPI_GetDiagField exiting 0

I'm not sure why. SQLMoreResults returns 100 only if currres is null and there is no cursor opened when curres is null.

Please could you create new mylog output with attached psqlodbc driver?

I hope Hiroshi will read this. I see another strenge thing. There is 3 times error "The cursor is open.". There is STMT_INVALID_CURSOR_STATE_ERROR reported two times (which is IMHO correct) and STMT_SEQUENCE_ERROR once (which seems wrong to me). I try to change this in attached dll but I think it's no real problem.

Regards,

Luf

------------------------------------------------------------ ----------

Comment By: Patrick Donelan (patspam)
Date: 2006-05-19 02:31

Message:
Please let me know if you need any more information about
this bug. I'm happy to help out as much as I can :)

Cheers,

Patrick

------------------------------------------------------------ ----------

Comment By: Dave Page (dpage)
Date: 2006-05-14 09:25

Message:
Previous bug 1000540 closed as this report is more up to date. Re-assigned to Luf in case he wants it :-)

------------------------------------------------------------ ----------

You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10006 30&group_id=1000125

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend