Page 1 of 1

No parameter supplied for unnamed parameter in SQL statement exception

Posted: Tue 21 Aug 2007 14:55
by archie
Hi,

I am experiencing trouble when trying to execute a certain query on a Microsoft SQL 2005 database.

The query I'm trying to execute is:

Code: Select all

INSERT INTO TBL_HISTORY ( HISTORY_ID, HISTORY_DATA, HISTORY_LWDATE, HISTORY_LWINIT ) VALUES ( '4D5B23FA2021EACP35E1NXA0300', '#CODE: ARCHIE\r\nArchie Europe bv\r\ndds\r\nGorslaan 10\r\n1441 RG PURMEREND NL\r\ntel. 0299 411 800 fax. 0299 411 888\r\n\r\nWe gaan hier even testen of het allemaal blijft werken met een\r\nlang ?\nstuk historie. Het wil namelijk nogal eens fout gaan\r\naangezien de ?\ngeweldige CLT viewer max. 65 tekens per regel kan\r\nweergeven. Nu is ?\ndit niet zo''''n  probleem ware het niet dat de\r\nEACP er af en toe een ?', '20070821', 'EACP' )
When I execute this query an exception (No parameter supplied for unnamed parameter in SQL statement) is thrown. When I try to execute this query with the native .Net SqlClient everything works fine. I also found out that if I remove the last quotation mark from the second parameter, it does work with UniDirect, but why can't I have that quotation mark at the end and why does it work with the native .Net SqlClient?

If you want to test this example, I have also created a CREATE script for the table:

Code: Select all

USE [ArchieTest]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TBL_HISTORY](
	[HISTORY_ID] [char](27) COLLATE Latin1_General_CS_AS NOT NULL,
	[HISTORY_DATA] [image] NULL DEFAULT (null),
	[HISTORY_LWDATE] [datetime] NOT NULL,
	[HISTORY_LWINIT] [varchar](4) COLLATE Latin1_General_CS_AS NOT NULL,
	[HISTORY_TEXT] [varchar](192) COLLATE Latin1_General_CS_AS NULL DEFAULT (null),
PRIMARY KEY CLUSTERED 
(
	[HISTORY_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
I hope you can help me out. Thanks in advance.

Posted: Tue 21 Aug 2007 16:00
by Alexey
We are investigating this problem. You will be notified on results as soon as possible.

Posted: Fri 28 Sep 2007 07:33
by Alexey
This problem is fixed.
Look forward to the next build.