JScript.NET Sample !

No Way
2002-11-27
2003-01-28
  • No Way
    No Way
    2002-11-27

    I made my first succesfull connection to the db via MySQLDriverCS with this code:
    <%@ Page Language="JScript" Debug="true" %>
    <%@ assembly name="MySQLDriverCS" %>
    <%@ Import namespace="System.Data" %>
    <%@ import NameSpace="MySQLDriverCS" %>

    <%
    var myConn : MySQLConnection = new MySQLConnection( new MySQLConnectionString("localhost","primer","spiko","pass").AsString); myConn.Open();

    var dt : DataTable = new MySQLSelectCommand(myConn, new Array("id","naziv","cena"), new Array("Artikel"), null, null, null).Table;
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <HTML>
    <head>
      <title>Spletno oglaevanje</title>
      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250">
    </head>
    <body>
    <%=dt.Rows[0][0].ToString()%>
    </body>
    </HTML>
    <%
    myConn.Close();
    myConn = null;
    dt=null;
    %>

    Good luck to you all.

     
    • Very good