TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
adam gills
NA
65
14.3k
create connection class in C#(windows application:vs2008)
Oct 4 2016 2:08 AM
Dear Sir,
Good morning !
I create a connection class in C# and i want to access it in my windows form application.
so plz help me how to get connection class in my windows form application.so that is can do insert,update and delete.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
namespace BrowseUrl
{
class globalconn
{
SqlDataAdapter adp = new SqlDataAdapter();
SqlCommand cmd=new SqlCommand();
SqlDataAdapter sda = new SqlDataAdapter();
public static SqlConnection GetConnection()
{
string constr = "Data Source=XXX.XX.XXX.XXX;Initial Catalog=mydb;User ID=xyz;Password=123456789";
SqlConnection conn = new SqlConnection(constr);
conn.Open();
return conn;
}
}
}
Reply
Answers (
3
)
how to connect my mvc project with my posgrey database
dont know how to start kendo ui