|
Log in | ||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
> 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
|
|||
|
|||
|
Using CommandType.StoredProcedure,
which would be the commandtext?? With cm.CommandText = "test (?)" I get a "Query preparation failed: Syntax error... ';' or <eof> expected: (" |
|
#4
|
|||
|
|||
|
> 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
|
|||
|
|||
|
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
|
|||
|
|||
|
> 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 | |
|
|
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 |