Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still trying to resolve errors using C# and a dataclass
Message
De
02/11/2004 02:22:52
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Versions des environnements
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00956670
Message ID:
00956867
Vues:
11
>>Tom
>
>Big SWAG here, but isn't the compiler throwing an error in the C# code? I'd think you'd need to return the proper data type in the function prototype.


Hi George,
How are you doing. As far as I could see he's returning the correct datatype in both C# methods. Actually he should only thouch the SqlConnection in one of his previous threads (below is the code I posted there).
private void button1_Click(object sender, System.EventArgs e)
{
// SqlConnection cn = new SqlConnection(
//  "Persist Security Info=False;Integrated Security=SSPI;database=pubs;server=localhost");
 SqlConnection cn = GetConnection();
 cn.Open() ;
 SqlDataReader rdr = new 
  SqlCommand("select * from authors",cn).ExecuteReader(CommandBehavior.CloseConnection);
 while (rdr.Read())
 {
	comboBox1.Items.Add(String.Format("{0},{1}",rdr["au_fname"],rdr["au_lname"]));
 }
 cn.Close();
}
Unfortunately I was the only one seeing this code as a simple solution:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform