List:MySQL on Win32« Previous MessageNext Message »
From:webmaster Date:January 8 2001 9:30pm
Subject:Re: "Your Help PleaseL"
View as plain text  
Hi

well I didn't say that jscript required a DSN...
I said that the sample code I provided required a DSN... ;o)

Thanks for this addon tho...

/////  D W A M   W 3   S P A C E  /////////////////////
Guillaume de Lafontaine - webmaster@stripped
. Services Internet : http://www.w3space.com
. Annuaire Aquitaine : http://www.aquitanet.com
. Espace TeleTravail : http://www.w3workers.com
 
-----Message d'origine-----
De : Christopher R. Jones <cj@stripped>
À : Guillaume <webmaster@stripped>; Frank M. Betz, Jr.
<fbetz@stripped>; win32@stripped <win32@stripped>; Cynic
<cynic@stripped>
Date : lundi 8 janvier 2001 22:11
Objet : Re: "Your Help PleaseL"


I am not sure why you said that JScript requires a DSN:
<%@ LANGUAGE=JScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>

<P>&nbsp;</P>

<%
ConnectionString1a = "Driver=MySQL;Server=crjnt2;UID=cjones;PWD=spikeo;OPTION=16386;"
conn1 = Server.CreateObject('ADODB.Connection');
conn1.Open( ConnectionString1a );
conn1.Execute( "USE Buildings" );
sql = "SELECT DISTINCT bldgtype, tpl, d2c001 FROM projects ORDER BY bldgtype";
rs1 = Server.CreateObject("ADODB.Recordset");
rs1.Open( sql, conn1);
rs1.MoveFirst();
var i = 0;
while( !rs1.EOF )
{
         bldg = rs1('bldgtype');
         tpl = rs1('tpl');
         d2c = rs1('d2c001');
         Response.Write( "<h1>" + bldg + "&nbsp;" + tpl + "&nbsp;" + d2c +
"</h1>" );
         rs1.MoveNext();
         i++;
}%>


>Hi
>
>for those who don't like vb !
>javascript connection (ODBC DSN required) :
>
>******************
><%@ LANGUAGE = JScript%>
><% var conn,result; conn = Server.CreateObject("ADODB.Connection");
> conn.Open("DSN=YOUR_DSN;Username=YOUR_ID;Password=YOUR_PWD"); result=conn.Execute("SELECT
> * FROM table"); while (!result.eof) { Response.Write(result("FIELD1") + " : " +
> result("FIELD2") + " " + result("FIELD3") + "
>"); result.MoveNext(); } result.close(); %> 
>*********************
>
>and those who can't get a DSN setup (if MyODBC's installed anyway to get the correct
> driver) :
>DSN-LESS connection string :
>
>************************
><%@ LANGUAGE="VBSCRIPT" %>
><% 
>strConnection =
> "driver={MySQL};server=YOUR_IP;uid=YOUR_ID;pwd=YOUR_PWD;database=YOUR_DB"
>Set adoDataConn = Server.CreateObject("ADODB.Connection") 
>adoDataConn.Open strConnection 
>
>strQuery = "SELECT * FROM your_table;"
>Set RS = adoDataConn.Execute(strQuery) 
>%> 
>
><% Response.Write SQL_query %>
><%while not RS.eof%> <%=RS("FIELD1")%> <%=RS("FIELD2")%>
> <%=RS("FIELD3")%>
><%RS.MoveNext%> <%wend%> <% RS.Close MyConn.Close 
>  
>*************************
>
>Yes there are some limitations... btw clever people turn around everything, don't they
> ? ;o)
>
>I'm about to test MyVbQL and brand new (still warm) MySQLX too...
>
>Hope this helps...
>
>/////  D W A M   W 3   S P A C E  /////////////////////
>Guillaume de Lafontaine - webmaster@stripped
>. Services Internet : http://www.w3space.com
>. Annuaire Aquitaine : http://www.aquitanet.com
>. Espace TeleTravail : http://www.w3workers.com
>  
>-----Message d'origine-----
>De : Cynic <cynic@stripped>
>À : Frank M. Betz, Jr. <fbetz@stripped>; win32@stripped
> <win32@stripped>
>Date : samedi 6 janvier 2001 06:04
>Objet : Re: "Your Help PleaseL"
>
>
>BTW, SAP DB seems very interesting, and when it completes 
>the opensourcing process, it might be we'll see it spread.
>
>
>At 05:58 6.1. 2001, Cynic wrote the following:
>-------------------------------------------------------------- 
> >Yes, there is more than one way. One can even write ASP in 
> >PerlScript & Perl for ISAPI: 
> >http://www.activestate.com/Products/ActivePerl/index.html
> >
> >I, for example, wouldn't avoid the combination of ASP and 
> >MySQL, because AFAIK the MySQL ADO provider (or what it's 
> >called) has some limitations. However... Don't know if it's 
> >better with any of OS RDBMS. 
> >
> >At 05:27 6.1. 2001, Frank M. Betz, Jr. wrote the following:
> >-------------------------------------------------------------- 
> >>the bottom line is, that there should be more than one way to do it!  Use
> >>the way your most comfortable.  I use php mostly for mysql since the power
> >>is built in, but if you have any other database let's just say sql server,
> >>you'll probably get better performance using vbscript (microsoft to
> >>microsoft).  the hardest part is trying to figure out which scripting
> >>language or programming language to learn inside and out.
> >>
> >>----- Original Message -----
> >>From: Cynic <cynic@stripped>
> >>To: David Patte <dpatte@stripped>;
> <win32@stripped>
> >>Sent: Friday, January 05, 2001 10:05 PM
> >>Subject: Re: "Your Help PleaseL"
> >>
> >>
> >>> Come on, grow up and get real. How can you say that PHP is
> >>> much clearer? This example was very clear, and almost identical
> >>> to how you could do it in PHP:
> >>>
> >>> <%
> >>> $MyConn = mysql_connect([arguments]);
> >>> $SQL_query = "SELECT * FROM your_table WHERE your_field LIKE '%abc%'";
> >>> $RS = mysql_query($SQL_query);
> >>> %>
> >>>
> >>> <HEAD>
> >>> <TITLE>PHP with MySQL</TITLE>
> >>> </HEAD>
> >>> <BODY>
> >>>
> >>> <p><b><% echo $SQL_query %></b></p>
> >>>
> >>> <% while($r=mysql_fetch_row($RS)):%>
> >>> <%=$r("FIELD1")
> %>&nbsp;<%=$r("FIELD2")%>&nbsp;<%=$r("FIELD3")%><br>
> >>> <%endwhile%>
> >>>
> >>> <%
> >>> mysql_free_result($RS);
> >>> mysql_close($MyConn);
> >>> %>
> >>>
> >>>
> >>>
> >>>
> >>> At 03:47 6.1. 2001, David Patte wrote the following:
> >>> --------------------------------------------------------------
> >>> >I have never seen vbscript before - wow - sure glad I use PHP -
> alot
> >>> >clearer :)
> >>> >
> >>> >
> >>> >
> >>> >Guillaume wrote:
> >>> >>
> >>> >> Hi
> >>> >>
> >>> >> first make sure you have a compatible webserver ! ;o)
> >>> >> PWS for 95 is OK
> >>> >> Your website on the internet may not support ASP
> >>> >>
> >>> >> Create a DSN like indicated in MyODBC doc file
> >>> >>
> >>> >> Then you can try this :
> >>> >>
> >>> >> vbscript connection (ODBC DSN required)
> >>> >>
> >>> >> *****
> >>> >> <%@ LANGUAGE="VBSCRIPT" %>
> >>> >> <%
> >>> >> Set MyConn = Server.CreateObject("ADODB.Connection")
> >>> >> MyConn.Open "YOUR_DSN"
> >>> >> SQL_query = "SELECT * FROM your_table WHERE your_field LIKE
> '%abc%';"
> >>> >> Set RS = MyConn.Execute(SQL_query)
> >>> >> %>
> >>> >> <HTML>
> >>> >> <HEAD>
> >>> >> <TITLE>ASP with MySQL</TITLE>
> >>> >> </HEAD>
> >>> >> <BODY>
> >>> >>
> >>> >> <p><b><% Response.Write SQL_query
> %></b></p>
> >>> >>
> >>> >> <%while not RS.eof%>
> >>> >>
> <%=RS("FIELD1")%>&nbsp;<%=RS("FIELD2")%>&nbsp;<%=RS("FIELD3")%><br>
> >>> >> <%RS.MoveNext%>
> >>> >> <%wend%>
> >>> >>
> >>> >> <%
> >>> >> RS.Close
> >>> >> MyConn.Close
> >>> >> </BODY>
> >>> >> </HTML>
> >>> >> ******
> >>> >>
> >>> >> just copy code above and name your file "test.asp"
> >>> >>
> >>> >> Should work... ;o)
> >>> >>
> >>> >> /////  D W A M   W 3   S P A C E  /////////////////////
> >>> >> Guillaume de Lafontaine - webmaster@stripped
> >>> >> . Services Internet : http://www.w3space.com
> >>> >> . Annuaire Aquitaine : http://www.aquitanet.com
> >>> >> . Espace TeleTravail : http://www.w3workers.com
> >>> >>
> >>> >> -----Message d'origine-----
> >>> >> De : TayeLeg@stripped <TayeLeg@stripped>
> >>> >> À : win32@stripped <win32@stripped>
> >>> >> Date : samedi 6 janvier 2001 02:59
> >>> >> Objet : "Your Help PleaseL"
> >>> >>
> >>> >> |
> >>> >> | I designed a database in MySQL on my Window 95 and  managed
> to walk
> >>through
> >>> >> |the various queries successfuly. Further, I installed  ODBC.
> Ofcours I
> >>have
> >>> >> |conncted to the internet.
> >>> >> |By writting a HTML together withVB Script on an editor (Note
> Pad)
> >>> >> |I failed to display anything using Browthers (Netscape or
> IExpl).
> >>> >> |
> >>> >> |After reading books, I realized that I have to use :
> >>> >> | ADO........which  I thought was only ODBC for my Win95 case.
> >>> >> |ASP......(Active Server Pages)  what I took it for editor
> >>> >> |
> >>> >> |   Actually, I am writting a THESIS but stucked.  Please tell
> me what
> >>to do?
> >>> >> |
> >>> >> |         thank you
> >>> >> |
> >>> >>
> |---------------------------------------------------------------------
> >>> >> |Please check
> "http://www.mysql.com/Manual_chapter/manual_toc.html"
> >>before
> >>> >> |posting. To request this thread, e-mail
> >>win32-thread4697@stripped
> >>> >> |
> >>> >> |To unsubscribe, send a message to the address shown in the
> >>> >> |List-Unsubscribe header of this message. If you cannot see
> it,
> >>> >> |e-mail win32-unsubscribe@stripped instead.
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> Please check
> "http://www.mysql.com/Manual_chapter/manual_toc.html"
> >>before
> >>> >> posting. To request this thread, e-mail
> >>win32-thread4698@stripped
> >>> >>
> >>> >> To unsubscribe, send a message to the address shown in the
> >>> >> List-Unsubscribe header of this message. If you cannot see it,
> >>> >> e-mail win32-unsubscribe@stripped instead.
> >>> >
> >>> >--
> >>> >David Patte
> >>> >Relative Data, Inc.
> >>> >----------------------
> >>> >MyStars! 2.7 "Shareware for Stargazers"
> >>> >24 Hr Bus. Phone/Fax: 1 (613) 728-4240
> >>> >
> >>> >Website #1: http://www.relativedata.com/
> >>> >Mirrorsite: http://www.relativedata.ca/
> >>> >
> >>> >Website #2: http://www.mystarslive.com/
> >>> >
> >>>
> >---------------------------------------------------------------------
> >>> >Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"
> before
> >>> >posting. To request this thread, e-mail
> win32-thread4699@stripped
> >>> >
> >>> >To unsubscribe, send a message to the address shown in the
> >>> >List-Unsubscribe header of this message. If you cannot see it,
> >>> >e-mail win32-unsubscribe@stripped instead.
> >>> ------end of quote------
> >>>
> >>>
> >>>
> >>> ____________________________________________________________
> >>> Cynic:
> >>>
> >>> A member of a group of ancient Greek philosophers who taught
> >>> that virtue constitutes happiness and that self control is
> >>> the essential part of virtue.
> >>>
> >>> cynic@stripped
> >>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"
> before
> >>> posting. To request this thread, e-mail
> win32-thread4700@stripped
> >>>
> >>> To unsubscribe, send a message to the address shown in the
> >>> List-Unsubscribe header of this message. If you cannot see it,
> >>> e-mail win32-unsubscribe@stripped instead.
> >>>
> >>>
> >>
> >>
> >>---------------------------------------------------------------------
> >>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> >>posting. To request this thread, e-mail win32-thread4701@stripped
> >>
> >>To unsubscribe, send a message to the address shown in the
> >>List-Unsubscribe header of this message. If you cannot see it,
> >>e-mail win32-unsubscribe@stripped instead.
> >------end of quote------ 
> >
> >
> >
> >____________________________________________________________
> >Cynic:
> >
> >A member of a group of ancient Greek philosophers who taught
> >that virtue constitutes happiness and that self control is
> >the essential part of virtue.
> >
> >cynic@stripped
> >
> >
> >
> >---------------------------------------------------------------------
> >Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> >posting. To request this thread, e-mail win32-thread4702@stripped
> >
> >To unsubscribe, send a message to the address shown in the
> >List-Unsubscribe header of this message. If you cannot see it,
> >e-mail win32-unsubscribe@stripped instead.
>------end of quote------ 
>
>
>
>____________________________________________________________
>Cynic:
>
>A member of a group of ancient Greek philosophers who taught
>that virtue constitutes happiness and that self control is
>the essential part of virtue.
>
>cynic@stripped
>
>
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail win32-thread4703@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail win32-unsubscribe@stripped instead.
>
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail win32-thread4709@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail win32-unsubscribe@stripped instead.

Thread
"Your Help PleaseL"TayeLeg6 Jan
  • RE: "Your Help PleaseL"Jacques Venter6 Jan
Re: "Your Help PleaseL"Guillaume6 Jan
  • Re: "Your Help PleaseL"David Patte6 Jan
    • Re: "Your Help PleaseL"Cynic6 Jan
  • Re: "Your Help PleaseL"Jr. Frank M. Betz6 Jan
    • Re: "Your Help PleaseL"Cynic6 Jan
      • Re: "Your Help PleaseL"Cynic6 Jan
Re: "Your Help PleaseL"Guillaume6 Jan
  • Re: "Your Help PleaseL"Christopher R. Jones8 Jan
Re: "Your Help PleaseL"webmaster8 Jan