hi guys. its been a long time but sincerely, am happy to be back. now i've got a problem on my mind and that is; am trying to develop a database application but i want it to be a console application. the major issue is that i dont know how to go about connecting vb.net console application to sql server or if its possible at all, but am sure its possible in this world of ours....love you all.
Netcode
33
Veteran Poster
Recommended Answers
Jump to Postit should follow the same concept.
you make Connection to the DB
and send it String commandsMyConnetion.Open() Dim SqlDataReader Sdr1 = new SqlCommand("Select A, B, C, D FROM XYZ",MyConnetion).ExecuteReader() While(Sdr1.Read()) { Console.WriteLine(Sdr1.GetInt32(0)) 'Assuming A is of type int in the table Console.WriteLine(Sdr1.GetString(1)) 'Assuming B is …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.