Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass a web variable to a stored procedure
Message
De
27/10/2008 14:22:33
 
 
À
27/10/2008 12:01:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
01257541
Message ID:
01357447
Vues:
24
Hi,

'?' is listed as being unsupported by the VFPOLEDB provider so explains your first problem.

However 'COPY TO' *is* at least documented as being supported so I don't know whether the seconed error message is misleading
(See the links from this page : http://msdn.microsoft.com/en-us/library/sht28225(VS.80).aspx for full lists of supported/unsupported commands and functions)

If this is ASP.NET how are you ensuring (and checking) that the user is indeed you?
Regards,
Viv


>Here is my present code
>function CreateCSV()
>
>use c:\inetpub\wwwroot\aspxtest\app_data\library3
>*set safety off
>*set talk off
>*set console off
>*set alternate to c:\inetpub\wwwroot\aspxtest\app_data\PAGLibrary.txt
>*set alternate on
>*scan
>*? library3.title
>*endscan
>*set alternate off
>*set alternate to
>*set safety on
>*set talk on
>*set console on
>use 
>endfunc
>Which runs OK. But if I uncomment the print line it fails. My original code was
>function CreateCSV()
>
>use c:\inetpub\wwwroot\aspxtest\app_data\library3
>set safety off
>copy to c:\inetpub\wwwroot\aspxtest\app_data\tempfile type csv
>set safety on
>use 
>endfunc
Which also failed. Error in both cases is "Feature not available". Note that I have used the full path to ensure that it is going to a folder with correct permissions and that the user (me) has no problems reading and writing to other files in this folder. Of additional interest is the fact that if I omit the TYPE clause from the COPY TO command it will work just fine. So apparently it is the TYPE clause that is causing the problem.
>:)
>
>
>>Hi,
>>
>>I see responses to this thread (or related ones) that should ensure that the SP attempts to execute and the 'COPY TO' command is listed as being supported by the VFPOLEDB so the most likely problem would be a permissions issue. Does the authenticated user have read/write permissions to the relevant folder? And what is the exact error?
>>
>>Regards,
>>Viv
>>
>>>Hi Viv
>>>You once showed me how to execute a stored procedure from ASP. Can you show me how to do it from VB NET? I have
>>>
>>>Dim oConnVFP As New Data.OleDb.OleDbConnection(ConfigurationManager.ConnectionStrings("VFPLibrary").ConnectionString)
>>>Dim objCommandCSV As New System.Data.OleDb.OleDbCommand("do createCSV", oConnVFP)
>>>
>>>objCommandCSV.CommandType = Data.CommandType.StoredProcedure
>>>
>>>oConnVFP.Open()
>>>objCommandCSV.ExecuteNonQuery()
>>>oConnVFP.Close()
>>>
>>>But this doesn't work. Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform