Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Going crazy with ASP
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00570258
Message ID:
00570445
Views:
19
>>>Hi there, here I am once again with the same question...
>>>I don't know how to get a value sent back from a stored procedure via ASP.
>>>I red some examples and tried them but without success.
>>>
>>>I tried this program in VFP and it works :
>>>
>>>Local NPROC,oConnection,Istr
>>>oConnection = CreateObject("adodb.connection")
>>>NPROC = "Mystoredproc(param)"
>>>With oConnection
>>> .ConnectionString = [Provider=VFPOLEDB.1;Data Source=MYDATABASE.DBC;]
>>> .Open
>>> istr = .execute(oproc)
>>>Endwith
>>>? "return value : " + istr.fields(0).value
>>>istr.close()
>>>oconnection.close()
>>>
>>>
>>>The fact is that it doesn't work in ASP...please help me before it's too late
>>>
>>>Thank u so much
>>>Alessio

Here is an asp script that works for me. I made a temp dbc in my root dir with a stored proc:


PROCEDURE GetDateToStr
RETURN DTOS(DATE())
ENDPROC


then I call it with a script like this:


HTML>
BODY>
< %
SET oConnection = Server.CreateObject("adodb.connection")
oConnection.ConnectionString = "Provider=VFPOLEDB.1;Data Source=c:\temp.DBC;"
oConnection.Open
SET iStr = oConnection.Execute("GetDateToStr()")

response.write(iStr.fields(0).value)

% >
/BODY>
/HTML>


I removed the < from the tags so it would display, you need those. And also put a space in the asp < %, take those out.

Make sure you use a SET on the iStr line. Otherwise, compare what you are doing to mine to see if anything stands out.

Bill
Bill Mittenzwey
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform