ASP.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a ASP.NET Expert!

Join 307,083 ASP.NET Programmers for FREE! Get instant access to thousands of ASP.NET experts, tutorials, code snippets, and more! There are 2,249 people online right now. Registration is fast and FREE... Join Now!




Connect to SQL

 

Connect to SQL

sonia.sardana

29 Jun, 2009 - 10:47 AM
Post #1

D.I.C Head
**

Joined: 1 Jun, 2008
Posts: 132



Thanked: 5 times
My Contributions
hey frnds, tell me one thing as in VB.Net suppose if we want to connnect to SQL,then in form coding itself.We create the database,Create table ...& insert values...

WE do that cz if we run the project at Client side,even if no database is there our project automatically creates it So that no error is there,Is it also possible in ASP.net...

Is yes,can somebody tell me from where to start...


User is offlineProfile CardPM
+Quote Post


eclipsed4utoo

RE: Connect To SQL

29 Jun, 2009 - 11:39 AM
Post #2

Not Your Ordinary Programmer
Group Icon

Joined: 21 Mar, 2008
Posts: 1,846



Thanked: 205 times
Dream Kudos: 500
Expert In: .NET

My Contributions
when communicating between .Net and SQL Server, I normally use the SqlConnection, SqlCommand, and SqlDataReader classes.

The SqlCommand object can run any sql statement. So if you construct a sql statement to create a new database, then the SqlCommand object can run that.
User is offlineProfile CardPM
+Quote Post

Karthik_rao

RE: Connect To SQL

30 Jun, 2009 - 04:12 AM
Post #3

New D.I.C Head
*

Joined: 15 Jun, 2009
Posts: 5

hi you are using window application or web application.

in window's application is applicable to install the MSDE, but we should have to create as a exe. to install in client system.



QUOTE(sonia.sardana @ 29 Jun, 2009 - 10:47 AM) *

hey frnds, tell me one thing as in VB.Net suppose if we want to connnect to SQL,then in form coding itself.We create the database,Create table ...& insert values...

WE do that cz if we run the project at Client side,even if no database is there our project automatically creates it So that no error is there,Is it also possible in ASP.net...

Is yes,can somebody tell me from where to start...


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 10:38AM

Live ASP.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

ASP.NET Tutorials

Reference Sheets

ASP.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month