Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
255 character limit
Message
De
29/11/2005 12:15:32
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/11/2005 10:23:40
Edward Crawford
City Facilities Management
Glasgow, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
01072400
Message ID:
01072885
Vues:
15
But this error has nothing to do with string length. It says you used "thisform" in your code and there is no form that "thisform" can reference to. Here is a sample returning a string longer than 255:
ASP code
<%
    set loCOM = Server.CreateObject("VFPCOMServer.VFPComClass")
    cCompanies = loCOM.GetCompanyList()
    ' Check results
    Response.Write(cCompanies)
%>
COM server's code
Define Class VFPCOMCLass As Session OlePublic
  Procedure GetCompanyList
    Select Cust_id,Company,Contact From (_samples+'data\customer') Into Cursor crsCompanies
    Set Textmerge To memvar m.lcCompanies Noshow
    Set Textmerge On
\\<table border="1">
    Scan
\<TR><TD><<cust_id>></TD><TD><<company>></TD><TD><<contact>></TD></TR>
    Endscan
\</table>
    Set Textmerge To
    Set Textmerge Off
    USE in 'customer'
    USE in 'crsCompanies'
    Return m.lcCompanies
  Endproc
Enddefine
PS: I know not a good coding but it's only for sampling to show it works.
Cetin

>I see what everyone is saying, but for some reason something is not working right. If I run getcompanylist() from a VFP form and return it to a edit box it works fine. However if I call it from an asp page I get this error. If I enclose it in a form it still returns the same error. Any ideas?
>
>Error Type:
>ad.setregistry ad.setregistry (0x800A0792)
>setregistry.getcompanylist c:\windows\classes\setregistry.vct Error in line 11 Object is not contained in a FORM. 1938
>/directory/directoryadmin.asp, line 28
>
>My asp page
>
><%@ Language=JavaScript  % >
>
><%
>var xml = new ActiveXObject("ad.setregistry");
>
>  % >
>
>
><body background = "commsfmbk.jpg">
><table  border = 0 align = center width = 900 >
>
>	<tr>
>		<td height= 160>
>			<img src=commsfm.jpg></img>
>		</td>
>	</tr>
>
>	<tr>
>		<td height = 80 align = center>
>			<font size= 5><b>DIRECTORY MAINTENANCE</b></font>
>		</td>
>	</tr>
>	<tr>
>		<td>
>			<table  border = 1 align = center width = 800 >
>				<%
>	Response.Write(xml.GetCompanyList(-2147483646,"SOFTWARE\IPDIRECTORY"));
>			 % >	
>			</table>
>		</TD>
>	</TR>
></table>
></body>
>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform