943,776 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1349
  • ASP.NET RSS
Jan 22nd, 2008
0

how can connect the database

Expand Post »
hi friends,
i had a problem when connecting the database to the asp.net. My database is SQL server 2005
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
snifer is offline Offline
1 posts
since Jan 2008
Jan 22nd, 2008
0

Re: how can connect the database

the following site shows connection string for all manor of DB's Connectionstrings.com/
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Bombdrop is offline Offline
1 posts
since Apr 2005
Jan 22nd, 2008
0

Re: how can connect the database

this following code to connect asp.net with sqlserver
ASP.NET Syntax (Toggle Plain Text)
  1. Imports System.Data
  2. Imports System.Data.SqlClient
  3.  
  4. Module ConnectionDB
  5. Public conn As New SqlConnection("Server = j3rry;" & "initial Catalog = PP60;" & " Trusted_Connection=yes")
  6. End Module
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Jan 22nd, 2008
0

Re: how can connect the database

... try using the New SQL Datasource option to make sure your creds are good.
Team Colleague
Reputation Points: 14
Solved Threads: 29
Posting Whiz in Training
ericstenson is offline Offline
293 posts
since Dec 2007
Jan 22nd, 2008
0

Re: how can connect the database

You could also place this "connection" in a Web.config file, for security purposes...

And to be sure... what version of ASP.NET are you speaking of? .Net 1.0, 1.1, 2.0, 3.0 ?

2.0 Tutorial: http://aspnet.4guysfromrolla.com/articles/110905-1.aspx
Last edited by Paladine; Jan 22nd, 2008 at 10:46 pm. Reason: Adding URL
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Event Calendar
Next Thread in ASP.NET Forum Timeline: how to secure webapplication?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC