Total members 11890 |It is currently Fri Apr 19, 2024 8:32 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Hello, Please am new on C# and am using Ms Visuall studio 2008 to build a windows form using C# but I dont know how to connect my submit button to the database ms sql server 2005, so i can view the information entered from the form. Thank you




Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

using System.Data.SqlClient;

String sqlQuery = "INSERT INTO table name Values (@,@,@,@,@,@)";
SqlConnection aConn = new SqlConnection("Data source= Your Computer name \\SQLEXPRESS; database= your database name ; Integrated Security = true");
SqlCommand aCommand = new SqlCommand(sqlQuery, aConn);



Regards
Joe


Author:
Newbie
User avatar Posts: 3
Have thanks: 1 time

For this message the author yosiffz has received gratitude : DrRakha
Post new topic Reply to topic  [ 2 posts ] 

  Related Posts  to : How do I connect my form tomy database
 How do I connect my form tomy database     -  
 How to connect database with Applets     -  
 Unable to connect to JavaDB Database     -  
 Connect to database Microsoft access within jsp servlet     -  
 form to insert data, upload many files and images , database     -  
 How to connect two computers and connect them with Internet?     -  
 php login form (sign-in form)     -  
 connect to MYSQL from ASP     -  
 Connect Dots     -  
 how to connect applet with excel     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com