Hello, Yes, the MSDN docs aren't clear here - it's true. I can't see anything wrong with parameters, however, there IS something wrong with your command text. You should change it to the: .Commandtext = "CALL WWIND.BESTELLUNGNEU(?,?)" One question mark should be provided for every parametr of sp. At least, this is how it works on my side. Good luck!
Marcin Pytel -- Uzytkownik <[EMAIL PROTECTED]> napisal w wiadomosci news:[EMAIL PROTECTED] > Hi Listmembers, > > I have a DB-procedure that uses one IN and one OUT-parameter. > 'CREATE DBPROC WWIND.BESTELLUNGNEU(IN KDNR FIXED(10), OUT BESTNR > FIXED(10))...' > > I would like to use this procedure in a VisualBasic .Net application with > an > OdbcCommand-objekt, but I do not know how to do this. The IN-paramter is > stored in a string-variable strKdnr, the OUT-parameter should be stored in > strBestnr. > > How do I have to use and define the ODBCCommand-object? > > > What I tried is something like that: > > Dim bestellnr As New Odbc.OdbcParameter > With bestellnr > .ParameterName = "@BESTNR" > .OdbcType = Odbc.OdbcType.Int > .Direction = ParameterDirection.Output > End With > Dim kdnr As New Odbc.OdbcParameter > With kdnr > .ParameterName = "@KDNR" > .OdbcType = Odbc.OdbcType.Int > .Direction = ParameterDirection.Input > .Value = strKdnr > End With > cn.open() > Dim cmd as New ODBC.ODBCCommand > With cmd > .Connection = cn > .CommandType = CommandType.StoredProcedure > .Parameters.Add(bestellnr) > .Parameters.Add(kdnr) > .Commandtext = "WWIND.BESTELLUNGNEU" > .ExecuteNonQuery() > End With > cn.close() > > > This does not work :( > As I never worked with StoredProcedures and VB before, I don't know if it > is > a problem with the parameters or what else is wrong, so it would be very > kind if someone can help me by showing a correct way to use that procedure > with an OdbcCommand-object. Unfourtunately the msdn-reference does not > help > me much :( > > Thanks a lot for help and comments. > > Kind regards > > -- > NEU: Telefon-Flatrate fürs dt. Festnetz! GMX Phone_Flat: 9,99 Euro/Mon.* > Für DSL-Nutzer. Ohne Providerwechsel! http://www.gmx.net/de/go/telefonie > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
