The How-To Geek Forums Have Migrated to Discourse

How-To Geek Forums / Geek Stuff

Vb.Net and SQL server

(2 posts)
  • Started 8 years ago by mlahleki
  • Latest reply from TooManyToyz
  • Topic Viewed 868 times


Recommended: Clean Your Mac the Easy Way with CleanMyMac 3

If you want to clean up your Mac the easy way, CleanMyMac is a great tool to get the job done easily, and it will even keep your computer clean automatically.

Unlike the competition, it also includes great tools like a Clean Uninstaller, to get rid of applications and clean up the junk that they leave behind. All with the click of a button.

Download CleanMyMac 3 for Free Today

Posted yesterday 
Posts: 1

Guys please help me out i'm stuck in this project. I'm developing it with and SQL for database, Could plz help me connect VB and SQL.and at least enter 1 record in the database.

Posted 8 years ago
Posts: 2

This is C# for getting data from a table. VB.Net will use the same objects so you should be able to look it up on MSDN and then figure out the rest.

SqlConnection conn = new SqlConnection("the conn string");
string query = "Select * From YourTableName"
DataTable dt = new dt("MyTable");
SqlCommand cmd = new SqlCommand(query, db);
cmd.CommandTimeout = 30;
SqlDataAdapter da = new SqlDataAdapter(cmd);

Posted 8 years ago

Topic Closed

This topic has been closed to new replies.