Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Going crazy with ASP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00570258
Message ID:
00570853
Vues:
18
>>>>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

I'm gonna check it
thank u anyway
Alessio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform