?
Solved

SQL Connection in ASP.NET VB

Posted on 2014-09-19
9
Medium Priority
?
259 Views
Last Modified: 2014-09-22
Hi,

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

Thanks
0
Comment
Question by:Gareth_Pointon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 34

Expert Comment

by:it_saige
ID: 40333592
Can probably never go wrong with 4 guys from rolla.  ;)

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

-saige-
0
 

Author Comment

by:Gareth_Pointon
ID: 40333613
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
 
LVL 34

Expert Comment

by:it_saige
ID: 40333615
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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 7

Expert Comment

by:Abu Hamdan
ID: 40333626
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
 

Author Comment

by:Gareth_Pointon
ID: 40333629
So is it the same string as Classic ASP ?
0
 
LVL 34

Expert Comment

by:it_saige
ID: 40333636
Yes.  The connection string specified should work:

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

-saige-
0
 

Author Comment

by:Gareth_Pointon
ID: 40333637
Dim MM_ETDBCONN_STRING
MM_ETDBCONN_STRING = "dsn=DNSSTRING;uid=DBUSER;pwd=PASSWORD;"


?
0
 
LVL 34

Accepted Solution

by:
it_saige earned 1500 total points
ID: 40333708
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
 

Author Comment

by:Gareth_Pointon
ID: 40334376
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question