seeing a student code
-
my student write this code, and asking me why it is not working.
String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
SqlConnection sql = new SqlConnection(connectionString);
sql.open();it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password
-
my student write this code, and asking me why it is not working.
String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
SqlConnection sql = new SqlConnection(connectionString);
sql.open();it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password
I thought you were hiding the password, then I read your explanation... :laugh: :laugh:
Reminiscing just isn't what it used to be!! If you like cars, check out the Booger Mobile blog | If you feel generous - make a donation to Camp Quality!!
-
my student write this code, and asking me why it is not working.
String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
SqlConnection sql = new SqlConnection(connectionString);
sql.open();it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password
-
my student write this code, and asking me why it is not working.
String connectionString="Data Source=asd;Persist Security Info=True;User ID=system;Password=******;Unicode=True"
SqlConnection sql = new SqlConnection(connectionString);
sql.open();it takes me a gr8 time to explain why he cant give password value ****** in a cs codefile. he just got the connectionString from database properties and think ****** is password
-
-
By not working I assume you mean not compiling? due to the missing semi-colon :laugh: Besides, I would be more concerned about the hard-coded connection string and lack of error handling ;)
Illogical thoughts make me ill
-
yeah, i know,but it was a database lab, they can choose there framework as they wish. i don't know why people like .net + oracle ,
errmm....net? wats wrong with it exaclty...I mean I know that connecting to databases other than Microsoft Sequel Server is horrible but tbh I mostly use Microsoft Sequel Server and the Linq To Sql Class seems to make life incredibly easy..or has nobody noticed that new class yet? :P
-
errmm....net? wats wrong with it exaclty...I mean I know that connecting to databases other than Microsoft Sequel Server is horrible but tbh I mostly use Microsoft Sequel Server and the Linq To Sql Class seems to make life incredibly easy..or has nobody noticed that new class yet? :P
Connecting to databases other than MSSQL is not "horrible" - generally it is identical, but with different class names: MySqlConnection, or SqlCeConnection instead of SqlConnection and so forth. While it works well, the concept of SqlConnection and SqlCommand is visually difficult, needs to be encased in
using
blocks, and is prone to SQL Injection attacks if you don't do it properly. I agree that Linq to SQL does make this process easier, but it is another thing for people to learn - and not everybody does (I am only just started on learning the details of Linq myself, and I have been using .NET for a while now). I think what the complaint was about, was the use of Oracle as the DB when there are "better" alternatives rather than the use of SQL and .NETReal men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
-
Connecting to databases other than MSSQL is not "horrible" - generally it is identical, but with different class names: MySqlConnection, or SqlCeConnection instead of SqlConnection and so forth. While it works well, the concept of SqlConnection and SqlCommand is visually difficult, needs to be encased in
using
blocks, and is prone to SQL Injection attacks if you don't do it properly. I agree that Linq to SQL does make this process easier, but it is another thing for people to learn - and not everybody does (I am only just started on learning the details of Linq myself, and I have been using .NET for a while now). I think what the complaint was about, was the use of Oracle as the DB when there are "better" alternatives rather than the use of SQL and .NETReal men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."