Exforsys
+ Reply to Thread
Results 1 to 2 of 2

how can i connect the database

This is a discussion on how can i connect the database within the ASP forums, part of the Programming Talk category; hi friends i has a problem when the database of sql sever2005 is connected with asp.net plz send the code ...

  1. #1
    snifer is offline Junior Member Array
    Join Date
    Jan 2008
    Answers
    1

    how can i connect the database

    hi friends
    i has a problem when the database of sql sever2005 is connected with asp.net plz send the code urgent


  2. #2
    bobby21 is offline Junior Member Array
    Join Date
    Mar 2008
    Answers
    10
    To connect to the database sqlserver with sql server authentication

    sqlconnection cn=new sqlconnection("data source=xxx;database=yyy;user id=sa;password=zzz");
    where xxx=server name, yyy= database name, zzz= password for sqlserver while u connect.

    if you wanna connect with windows authentication:

    sqlconnection cn=new sqlconnection("data source=xxx;database=yyy;trusted_connection=yes");
    where xxx=server name, yyy= database name


Latest Article

Network Security Risk Assessment and Measurement

Read More...