Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

SQL Connection in ASP.NET VB

Hi,

I'm trying to learn ASP.NET and am looking for a good tutorial on data connection to SQL Database.

Thanks
0
Gareth_Pointon
Asked:
Gareth_Pointon
  • 4
  • 4
1 Solution
 
it_saigeDeveloperCommented:
Can probably never go wrong with 4 guys from rolla.  ;)

http://www.4guysfromrolla.com/articles/110905-1.aspx

-saige-
0
 
Gareth_PointonAuthor Commented:
Hi,

I'm using Dreamweiver at the moment for the Dev.

Its going on about SPRY Connection but totally non the wiser. ITs all Japanese to me :-(
0
 
it_saigeDeveloperCommented:
In that case, here is the Adobe TID on database connections for Dreamweaver.

http://helpx.adobe.com/dreamweaver/using/database-connections-asp-developers-cs6.html

HTH,

-saige-
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Abu HamdanEnterprise Architect, PM ExpertCommented:
Hi,

I would recommend this site;

http://www.w3schools.com/aspnet

Its great for beginners and take you step by step.

DB related:

http://www.w3schools.com/aspnet/webpages_ref_database.asp
0
 
Gareth_PointonAuthor Commented:
So is it the same string as Classic ASP ?
0
 
it_saigeDeveloperCommented:
Yes.  The connection string specified should work:

Driver={SQL Server};Server=Socrates;Database=AcmeMktg; UID=wiley;PWD=roadrunner

-saige-
0
 
Gareth_PointonAuthor Commented:
Dim MM_ETDBCONN_STRING
MM_ETDBCONN_STRING = "dsn=DNSSTRING;uid=DBUSER;pwd=PASSWORD;"


?
0
 
it_saigeDeveloperCommented:
You want to try something like this:

Dim Connection As New SqlClient.SqlConnectionStringBuilder
Connection.DataSource = "Database name"
Connection.UserID = "user name"
Connection.Password = "password"
Dim objSQlConnection = New SqlClient.SqlConnection(Connection.ConnectionString)

Open in new window


Make sure that at the head of the file you include:
Imports System.Data.SqlClient

Open in new window


More information concerning the SqlConnectionStringBuilder class:

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder(v=vs.110).aspx

HTH,

-saige-
0
 
Gareth_PointonAuthor Commented:
OK..

Reading more in to it I have to decide what coding method I'm going to learn...

Looking there are two main ones. Razor and MVC.

What would be peoples professional opinions as I read Razor keeps out the way more and is easier to learn which it appealing.

Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now