Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How I do for connect Lingo with SQL Server

90 views
Skip to first unread message

Alberto Rodriguez Barco

unread,
Jul 11, 2000, 3:00:00 AM7/11/00
to
Please Help me, say me about any xtra.

Chuck Neal

unread,
Jul 11, 2000, 3:00:00 AM7/11/00
to
You can do this via calls through a CGI. Also check out the Valentina Xtra
at http://www.paradigmasoft.com

-Chuck Neal
Macromedia Evangelist
ch...@mediamacros.com
-------------------------------------------
Free code, games source, and more. All available now at
http://www.mediamacros.com
Keep up with the latest news! Join the MediaMacros mailing list at
http://www.mediamacros.com/mailing.shtml
Ready for intense, hands-on training for Director? Visit
http://www.lingochallenge.com


Alberto Rodriguez Barco <arodr...@gint.com.mx> wrote in message
news:8kfr4h$j59$1...@misc.macromedia.com...

Tomasz Wisniewski

unread,
Jul 12, 2000, 3:00:00 AM7/12/00
to

>Chuck Neal" <ch...@mediamacros.com> wrote>

>You can do this via calls through a CGI.

Can u point me to some "Calls via CGI for Director for beginners" :)

Tomasz Wisniewski

Chuck Neal

unread,
Jul 12, 2000, 3:00:00 AM7/12/00
to
It depends on the CGI, but the standard format is...

http://www.domain.com/cgi-bin/yourcgi.cgi?variable=value&variable2=value2

-Chuck Neal
Macromedia Evangelist
ch...@mediamacros.com
-------------------------------------------
Free code, games source, and more. All available now at
http://www.mediamacros.com
Keep up with the latest news! Join the MediaMacros mailing list at
http://www.mediamacros.com/mailing.shtml
Ready for intense, hands-on training for Director? Visit
http://www.lingochallenge.com


Tomasz Wisniewski <en...@mad.com.pl> wrote in message
news:8khlvd$661$1...@misc.macromedia.com...

Tomasz Wisniewski

unread,
Jul 12, 2000, 3:00:00 AM7/12/00
to
> It depends on the CGI, but the standard format is...
>
> http://www.domain.com/cgi-bin/yourcgi.cgi?variable=value&variable2=value2

but any info how does "yourcgi.cgi" script should look ?
some pointer to where to find info about writing such

Tomasz Wisniewski

Chuck Neal

unread,
Jul 12, 2000, 3:00:00 AM7/12/00
to
Well, CGI can be written in many formats such as Perl, ASP, etc. TO start
with some Perl scripts check
http://www.cgi-resources.com/Programs_and_Scripts/Perl/

-Chuck Neal
Macromedia Evangelist
ch...@mediamacros.com
-------------------------------------------
Free code, games source, and more. All available now at
http://www.mediamacros.com
Keep up with the latest news! Join the MediaMacros mailing list at
http://www.mediamacros.com/mailing.shtml
Ready for intense, hands-on training for Director? Visit
http://www.lingochallenge.com


Tomasz Wisniewski <en...@mad.com.pl> wrote in message

news:8ki3ft$g3$1...@misc.macromedia.com...

Alberto Rodriguez Barco

unread,
Jul 12, 2000, 3:00:00 AM7/12/00
to
Thanks Chuck

I´m using now the Valentina xtra!


Chuck Neal <ch...@mediamacros.com> escribió en el mensaje de noticias
8kfsmt$lk3$1...@misc.macromedia.com...


> You can do this via calls through a CGI. Also check out the Valentina
Xtra
> at http://www.paradigmasoft.com
>

> -Chuck Neal
> Macromedia Evangelist
> ch...@mediamacros.com
> -------------------------------------------
> Free code, games source, and more. All available now at
> http://www.mediamacros.com
> Keep up with the latest news! Join the MediaMacros mailing list at
> http://www.mediamacros.com/mailing.shtml
> Ready for intense, hands-on training for Director? Visit
> http://www.lingochallenge.com
>
>

Cath Sample

unread,
Jul 14, 2000, 3:00:00 AM7/14/00
to

Rolf Lidén

unread,
Jul 14, 2000, 3:00:00 AM7/14/00
to
I would use ASP, CGI, PHP or JSP instead of a xtra!


"Cath Sample" <ca...@phosphor.co.nz> wrote in message
news:396EA319...@phosphor.co.nz...

Bob Ippolito

unread,
Jul 14, 2000, 3:00:00 AM7/14/00
to
If you are doing it with perl. You should look into the DBI perl module and
the proper DBD for your SQL database. You should also look into the CGI
perl module because it makes handling requests much easier.. Heres an
example of a cgi script using the aforementioned modules connecting to a
MySQL database on localhost:

#!/usr/bin/perl
use DBI;
use CGI qw(:standard);
#connecting to the database named dev
my $dbh = DBI->connect("DBI:mysql:dev","mylogin","mypassword");
#I've had problems with director using text/plain, text/html is safe
print "Content-type: text/html\n\n";
my $sth=$dbh->prepare("select " . param('selectstatement'));
$sth->execute();
my $rows = $sth->rows;
for (my $k=$rows;$k>0;$k--) {
my @list = $sth->fetchrow_array();
my $lingolist = '["' . (join '","',@list) . '"]';
print $lingolist . "\n";
}
$sth->finish;

that should work, I'm not on a unix box right now so I didnt try it.. but
that'll return your results in a lingo list.. to read them, you'd need to do
a postNetText() with a selectstatement parameter that looks vaguely like
"column,names,here from tablename where conditions".. and when the netId it
returns is done, you can get the result (getNetTextResult I think) and then
each line can be read as a lingo list and put into a lingo list..

selectresults=[]
repeat with count=1 to textresult.lines
selectresults.add(value(textresult.line[count]))
end repeat

then lets say you want to get the data for the first result from the second
column you asked for, you'd do selectresults[1][2].. if that doesnt work,
try

thelist=selectresults[1]
thedatayouwant=thelist[2]

If it (any of this) doesnt work, look in the Lingo reference in your help
menu for the correct syntax, but the methodology is correct.

b...@vir2l.com
http://vir2l.com/


"Tomasz Wisniewski" <en...@mad.com.pl> wrote in message
news:8ki3ft$g3$1...@misc.macromedia.com...

> > It depends on the CGI, but the standard format is...
> >
> >
http://www.domain.com/cgi-bin/yourcgi.cgi?variable=value&variable2=value2
>

> but any info how does "yourcgi.cgi" script should look ?
> some pointer to where to find info about writing such
>

> Tomasz Wisniewski
>
>

Andrew Morton

unread,
Jul 14, 2000, 3:00:00 AM7/14/00
to
> #!/usr/bin/perl
> use DBI;
> use CGI qw(:standard);
...
no -w on the shebang line?
no use strict; ?

I'm only starting learning perl and the books I have recommend those bits.
Any reason not to? (Other than beginners like me can write stuff that does what I want first
time (ish) without them?)

Andrew Morton

Bob Ippolito

unread,
Jul 14, 2000, 3:00:00 AM7/14/00
to
The code I wrote will run without complaint even with -w and use strict..
I've been doing perl for a long time, I know what -w and use strict expect
my code to look like. I don't include them in my page-long programs anymore
because I dont typically forget to localize variables (note the my on all my
vars) and I dont really make syntax errors that often anymore. But yes, use
it at all times if you're starting out especially if the codebase is large.
They don't affect your program in any way, they just say "Hey you! What the
hell do you think you are doing? You shouldn't do that. Naughty you." In
other words, of course (most of the time).

They have absolutely no effect on the code at runtime, other than the fact
that use strict and -w will cause a sloppy program that may or may not work
to not run at all to let you know that you may be doing something bad,
because its sloppy and good programmers don't like sloppy (unless they're
doing something small in which case they dont care).

but yeah, if you change the first line to #/usr/bin/perl -w and insert use
strict; afterwards it would have absolutely no effect on what I wrote. Not
that I actually tried to run the codebit I wrote... so if I did fuck up,
oops, but I doubt it ;)

all in all, use them, theres no reason not to. but it would've been an
extra 14 or so keystrokes on my part and I guess I just didn't have the
effort in me at the time.

b...@vir2l.com
http://vir2l.com/


"Andrew Morton" <a...@tinyonline.co.uk> wrote in message
news:8kndr9$b3g$1...@misc.macromedia.com...

0 new messages