Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to DB from a Projector

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
Is it possible to fire off a page (like an asp page) that needs to be processed from a projector?
 
I didnt write this...its an answer I saved one time in case i ever have to deal with this situation so i cant say how well it works.


................

ASP sample

First of all create a txt name input text and add it into your server. where
you can find or view it as:
EX:
I'm going to give you 2 types of ASP
see if which one work for you :

Type #1:

'--------copy below-------
<%
Dim objFSO, objTextFile,thetext ' Declare variables for the File System
Object and the File to be accessed.
thetext=request.form(&quot;thetext&quot;) ' Request the text you wanted to save
Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;) ' Create an instance
of the the File System Object and assign it to objFSO.
Set objTextFile = objFSO.CreateTextFile(&quot;objTextFile.WriteLine &quot;thetext=&quot; & thetext ' Write in the input.txt.
objTextFile.Close ' Close the file.
Set objTextFile = Nothing ' Release reference to the text file.
Set objFSO = Nothing ' Release reference to the File System Object.
%>
'---------stop here-----------

Type#2
'---------start here----------

<%
Dim objFSO, objTextFile,thetext ' Declare variables for the File System
Object and the File to be accessed.
thetext=request.form(&quot;thetext&quot;) ' Request the text you wanted to save
Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;) ' Create an instance
of the the File System Object and assign it to objFSO.

Set objTextFile = objFSO.CreateTextFile(Server.MapPath(&quot;input.txt&quot;)) ' Open
the file
objTextFile.WriteLine &quot;thetext=&quot; & thetext ' Write in the textfile.txt.
objTextFile.Close ' Close the file.
Set objTextFile = Nothing ' Release reference to the text file.
Set objFSO = Nothing ' Release reference to the File System Object.
%>

'-------stop here-------

Make sure your server Support ASP.
make sure.. all files are in same dirctory (SWF/ASP/TXT)

Last will the action from flash
loadVariables (&quot; &quot;/&quot;, &quot;POST&quot;);

and you all set .
 
Bill you should really learn how to use the &quot;code&quot; tags, when posting code with urls for instance, it would avoid the confusion that may be created with the added &quot;;&quot; at the end of your urls, if you don't.

Regards,

cubalibre2.gif
 
wow - I got it figured out - my code was not that long though.... I just did loadVariablesNum (&quot; 0, &quot;Post&quot;);

The part I was getting stuck on was loadVariablesNum (&quot;record.asp&quot;....

and doing it like that was not running it through the web server because it was a projector.... but since I did as in my first example (putting the whole URL) it runs it through the web server and works great....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top