Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #5738
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 |
| Date | 2013-08-27 13:06 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <kviprm$6vj$1@speranza.aioe.org> (permalink) |
| References | (1 earlier) <db93f57f-fb29-4f0e-b8cf-c42cbee0cfb1@googlegroups.com> <kueba2$dh2$1@speranza.aioe.org> <ef36bfe2-12c2-4d55-97ae-10400f880f64@googlegroups.com> <2039902398399056638.958873williem-wmconsulting.com@news.aioe.org> <6854cdae-cae6-47c2-bdf3-17834ae2fc9c@googlegroups.com> |
Gerard,
have reviewed your sample and could recreate it on my SQL 2012 box. Please
make the following change to your source and your sample will run. I have
included the complete sample that I used for running it through the
debugger.
oConn := SQLConnection{}
oConn:ODBCCursors := SQL_CUR_USE_ODBC
Regards,
Willie
Vulcan VIP
FUNCTION Start
LOCAL oConn as SQLConnection
LOCAL oSelect as SQLSelect
LOCAL uValue as USUAL
LOCAL aParameter as ARRAY
oConn := SQLConnection{}
oConn:ODBCCursors := SQL_CUR_USE_ODBC
IF !oConn:connect( "Test")
oConn:DriverConnect()
ENDIF
IF oConn:Connected
//- try passing parameter as part of select string
oSelect := SQLSelect{ "Exec MyProc 101" , oConn }
IF Empty(oSelect:Status)
oSelect:GoTop()
uValue := oSelect:FIELDGET(1) // zero
ENDIF
oSelect:Close()
? " passing number as part of string " + AsString(uValue)
///------ try using the new SQLParameter class
aParameter := {}
AAdd(aParameter, SqlParameter{101, SQL_PARAM_INPUT, SQL_INTEGER})
oSelect := SQLSelect{ "Exec MyProc ?" , oConn }
IF oSelect:Execute(aParameter)
IF Empty(oSelect:Status)
oSelect:GoTop()
uValue := oSelect:FIELDGET(1) // zero
ENDIF
ENDIF
oSelect:Close()
? " passing number as a parameter " + AsString(uValue)
///------ try without any parameters
oSelect := SQLSelect{ "Exec MyProc" , oConn }
IF Empty(oSelect:Status)
oSelect:GoTop()
uValue := oSelect:FIELDGET(1) // zero
ENDIF
oSelect:Close()
? " passing number without parameter " + AsString(uValue)
else
? "no SQL Connection"
ENDIF
WAIT
RETURN nil
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-09 20:34 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-11 16:49 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 "Willie Moore" <williem@wmconsulting.com> - 2013-08-13 09:56 -0500
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-13 14:32 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 "Willie Moore" <williem@wmconsulting.com> - 2013-08-13 17:17 -0500
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-13 17:52 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-21 15:17 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 Willie Moore <williem@wmconsulting.com> - 2013-08-24 17:05 +0000
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-25 18:35 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 "Willie Moore" <williem@wmconsulting.com> - 2013-08-27 13:06 -0500
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-27 15:21 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 Willie Moore <williem@wmconsulting.com> - 2013-08-27 22:26 +0000
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 D.J.W. van Kooten <public@ic2remove.this.com> - 2013-09-11 23:19 +0200
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-13 18:03 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 codesys75@orange.fr - 2013-08-23 06:24 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-25 18:34 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 Daniel Costagliola <codesys75@orange.fr> - 2013-08-26 01:47 -0700
Re: SQLSelect does not return results when calling a stored procedure in VO 2.8 sudden2011@gmail.com - 2013-08-26 19:30 -0700
csiph-web