Print Page | Close Window

As New SqlConnection( **problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=4127
Printed Date: 28 March 2026 at 5:59pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: As New SqlConnection( **problem
Posted By: joshb
Subject: As New SqlConnection( **problem
Date Posted: 08 July 2003 at 6:24am

I am very new to ASP.NET, just started my training yesterday, and the examples point to this connection string.

Dim cnn As New SqlConnection( "Data Source=(local);Initial Catalog=Northwind;User ID=sa;Password=;")

And I would like it to point to my sql server. Which is called 'sql' and obviously has the Northwind database.

I attempted many different things but nothing.

Dim cnn As New SqlConnection( "server=(sql);database=Northwind;User ID=sa;Password=;")

Dim cnn As New SqlConnection( "Data Source=(sql);Initial Catalog=Northwind;User ID=sa;Password=;")

What am I doing wrong?

Any help would be greatly appreciated.



-------------
I'm a wannabe programmer that knows how to do nothing but create invalid procedure arguments.
http://www.soopportal.com">



Replies:
Posted By: joshb
Date Posted: 08 July 2003 at 6:59am

Ok, nm I found it:

Dim cnn As New SqlConnection("server=sql;initial catalog=Northwind;User ID=username;Password=password;")



-------------
I'm a wannabe programmer that knows how to do nothing but create invalid procedure arguments.
http://www.soopportal.com">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net