Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is YAG? What are the reasons?
Message
 
To
03/04/2007 17:06:27
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01210085
Message ID:
01212012
Views:
16
Good morning John;

ASP.NET is more verbose. Surely that makes it a better tool for software development! :)

At least my company pays me to do ASP.NET. That being the case I really do not care. Why be efficient when you can be "Microsoft Compliant", and support company mandated policies and procedures at the same time? :)

Tom

>I hope I never have to learn that godawful language. Do you have to type it in that way or is it generated by a GUI builder?
>
>In the interests of clarity, I thought I'd provide sample ASP.NET code to perform similar SQL, except with none of the error checking or handling included in the PHP version:
>
>
>< %@ Page CompilerOptions='/R:"C:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.dll"'% >
>< %@ Import Namespace="System.Data" % >
>< %@ Import Namespace="Microsoft.Data.Odbc" % >
><SCRIPT Language="VB" Runat="server">
>Sub Page_Load(Source as object, e as EventArgs)
>Dim sConString As String = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=linux3;
>DATABASE=maindata; UID=user1; PASSWORD=user1pass; OPTION=3"
>Dim oConnection as ODBCConnection = new ODBCConnection(sConString)
>Dim sSQL as String = "SELECT name,contact,email,enabled,username FROM customer"
>Dim oDataAdapter as ODBCDataAdapter = New ODBCDataAdapter(sSQL, oConnection)
>Dim oDataSet as DataSet = new DataSet()
>oDataAdapter.Fill(oDataSet)
>
>
>Here's the PHP equivalent, removing variables and error checking so it's equivalent:
>
>
><?php
>$connection=mysql_connect("linux3","user1","user1password");
>$db=mysql_select_db("maindata",$connection);
>$sql="SELECT name,contact,email,enabled,username FROM customer";
>$result=mysql_query($sql);
>
>
>Now we should ask a VFP person familiar with neither which is the more "godawful". ;-)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform