#1  
Old 1st June 2012, 10:19 PM
dani dani is offline
Junior Member
 
Join Date: Jun 2012
Posts: 7
Default Out Parameter Error

Hi,
I have created a Procedure:

DROP ROUTINE IF EXISTS "Test";
CREATE PROCEDURE Test
( out texto char )
READS SQL DATA
BEGIN
SET texto='a';
END

and then, connecting from c#, I try to use it with an output parameter:

Dim cm As New NxCommand
cm.CommandText = "CALL test (?)"
Dim p1 As New NxParameter
p1.Direction = ParameterDirection.Output
p1.NXType = NxDataTypes.nxtWideString
p1.ParameterName = ":texto"
p1.Value = ""
cm.Parameters.Add(p1)
cm.ExecuteNonQuery()


and I get this error:

NexusDB: <unnamed TnxQuery instance>: Query execution failed:
Unknown column ''

[$3CA0/15520]


I'm using Nexus Database Server 3.10 and ADO.Net Connector build 124

where i am wrong?

Thanks
  #2  
Old 2nd June 2012, 10:44 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Out Parameter Error

> Dim cm As New NxCommand

I believe there's a line missing here:

cm.CommandType=CommandType.StoredProcedure ;

I haven't actually tested this though, let me know if it doesn't work.

--
Eivind Bakkestuen [NDD]
  #3  
Old 4th June 2012, 05:16 AM
dani dani is offline
Junior Member
 
Join Date: Jun 2012
Posts: 7
Default

Using CommandType.StoredProcedure,
which would be the commandtext??
With
cm.CommandText = "test (?)"
I get a "Query preparation failed: Syntax error... ';' or <eof> expected: ("
  #4  
Old 4th June 2012, 09:52 AM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Out Parameter Error

> Using CommandType.StoredProcedure,
> which would be the commandtext??


Look at .NET help for StoredProcedure, or other hits?

http://stackoverflow.com/questions/6...toredprocedure

--
Eivind Bakkestuen [NDD]
  #5  
Old 4th June 2012, 06:48 PM
dani dani is offline
Junior Member
 
Join Date: Jun 2012
Posts: 7
Default

Using output parameters,

cm.Connection = cn
cm.CommandType = CommandType.StoredProcedure
cm.CommandText = "test"
Dim p1 As New NxParameter
p1.ParameterName = "texto"
p1.Direction = ParameterDirection.Output
p1.NXType = NxDataTypes.nxtWideString
p1.Value = ""

cm.Parameters.Add(p1)
cm.ExecuteNonQuery()

I get the same error:
NexusDB: <unnamed TnxQuery instance>: Query execution failed:
Unknown column ''

[$3CA0/15520]

it is only working ok with input parameters
  #6  
Old 5th June 2012, 12:04 PM
Eivind Bakkestuen [NDD]
 
Posts: n/a
Default Re: Out Parameter Error

> it is only working ok with input parameters

Hm, sorry about that; I have logged an issue for investigation.

In the meantime, you can work around it by doing something like:

declare s char;
call test(s);
select s from #dummy

--
Eivind Bakkestuen [NDD]


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
out parameter in SP - Null column error blnicholson nexusdb.public.support.adoprovider 2 1st June 2012 09:19 PM
Value error after parameter binding Martijn Tonies nexusdb.public.support.sql 3 25th October 2011 09:11 PM
Somebody else having issues with "Error: Parameter 'SomeParameter'not found" Rodrigo Gomez [NDX] nexusdb.public.support.adoprovider 1 3rd June 2011 03:12 AM
Parameter value not yet available sorin nexusdb.public.support.sql 13 22nd December 2006 08:15 PM
Parameter value not yet available sorin Binaries 0 22nd December 2006 09:30 AM


All times are GMT +11. The time now is 09:22 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.