Error when delete with datetime parameter

Report PGNP bugs.

Error when delete with datetime parameter

Postby karpiv » Fri Dec 04, 2009 1:15 am

I have linkedserver "TestPGNP" configured as shown in your manual.

I have some troubles when I attempt execute delete statement with datetime parameter:
Code: Select all
EXEC ('create table testtable (id int, dt timestamptz)') AT testPGNP

Command(s) completed successfully.

Code: Select all
INSERT INTO testPGNP.testPGNP.[public].testtable(id,dt)
SELECT 1, GETDATE()
UNION ALL
SELECT 2, GETDATE()

(2 row(s) affected)

Code: Select all
SELECT * FROM testPGNP.testPGNP.[public].testtable WHERE dt<GETDATE()

id dt
----------- ----------------------
1 2009-12-04 10:03:06.00
2 2009-12-04 10:03:06.00

(2 row(s) affected)

Code: Select all
DELETE FROM testPGNP.testPGNP.[public].testtable WHERE dt<GETDATE()

OLE DB provider "PGNP" for linked server "testPGNP" returned message "ERROR: bind message supplies 2 parameters, but prepared statement "975626f7afaf86e09b88b0a45573b957" requires 1
".
Msg 7320, Level 16, State 2, Line 1
Cannot execute the query "DELETE FROM "testPGNP"."public"."testtable" WHERE "dt"<?" against OLE DB provider "PGNP" for linked server "testPGNP".

or
Code: Select all
DECLARE @DT DATETIME
SET @Dt = GETDATE()
DELETE FROM testPGNP.testPGNP.[public].testtable WHERE dt<@Dt

OLE DB provider "PGNP" for linked server "testPGNP" returned message "ERROR: bind message supplies 2 parameters, but prepared statement "975626f7afaf86e09b88b0a45573b957" requires 1
".
Msg 7320, Level 16, State 2, Line 4
Cannot execute the query "DELETE FROM "testPGNP"."public"."testtable" WHERE "dt"<?" against OLE DB provider "PGNP" for linked server "testPGNP".
karpiv
 
Posts: 6
Joined: Wed Dec 02, 2009 7:24 am

Re: Error when delete with datetime parameter

Postby Moderator » Sun Dec 06, 2009 9:54 pm

We have reproduced the issue and are working on the fix. We'll update the thread when the fixed build is ready. Thank you!
User avatar
Moderator
Site Admin
 
Posts: 279
Joined: Wed Oct 29, 2008 11:27 pm

Re: Error when delete with datetime parameter

Postby Moderator » Tue Jan 26, 2010 9:39 pm

The defect was fixed and available since build 2124 (published on Dec 22nd).
Thank you!
User avatar
Moderator
Site Admin
 
Posts: 279
Joined: Wed Oct 29, 2008 11:27 pm


Return to Report Bugs

Who is online

Users browsing this forum: No registered users and 1 guest