pls help me its very urgent work

Posted by Chanti444 under ASP.NET on 11/19/2011 | Points: 10 | Views : 1462 | Status : [Member] | Replies : 3
hi,
i know online database userid, password now i want to connect with online database using with asp.net how can i connect ..........what should i write in
connectinstring

help me pls its very urgnet pls pls

satya


Responses

Posted by: SheoNarayan on: 11/19/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Chanti ...

Read this code snippet post that has complete description of how to save it and read it.

http://www.dotnetfunda.com/codes/code996-connection-string-in-webconfig-file.aspx

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Chanti444, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Blessyjees on: 11/21/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi,

In class file you can try this.

SqlConnection con = new SqlConnection("data source=<your sql server name>;initial catalog=<your table name";user id=<your usename>;password=<your password>");

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Chanti444, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: perfectchourasia-9163 on: 11/21/2011 [Member] Starter | Points: 25

Up
0
Down
SqlConnection con = new SqlConnection("data source=<your sql server name>;initial catalog=<your table name";user id=<your usename>;password=<your password>");

http://msdn.microsoft.com/en-us/library/f28szy5b(vs.71).aspx




ER sandeep chourasia
sandeepchrs@yahoo.com (on facebook)
http://www.aspnetcodes.com/

Chanti444, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response