Click here to Skip to main content
15,890,438 members
Home / Discussions / Database
   

Database

 
QuestionProblem while accessing the committed data + sql server 2005 Pin
Pankaj Garg15-Jun-09 2:39
Pankaj Garg15-Jun-09 2:39 
AnswerRe: Problem while accessing the committed data + sql server 2005 Pin
himanshu256115-Jun-09 2:52
himanshu256115-Jun-09 2:52 
GeneralRe: Problem while accessing the committed data + sql server 2005 Pin
Pankaj Garg15-Jun-09 3:18
Pankaj Garg15-Jun-09 3:18 
QuestionIP restriction Error in SQL Server 2005 Pin
Aman786Singh15-Jun-09 1:00
Aman786Singh15-Jun-09 1:00 
QuestionRe: IP restriction Error in SQL Server 2005 Pin
Eddy Vluggen15-Jun-09 1:35
professionalEddy Vluggen15-Jun-09 1:35 
AnswerRe: IP restriction Error in SQL Server 2005 Pin
Manas Bhardwaj15-Jun-09 3:25
professionalManas Bhardwaj15-Jun-09 3:25 
AnswerRe: IP restriction Error in SQL Server 2005 Pin
Kaushal Arora15-Jun-09 7:10
Kaushal Arora15-Jun-09 7:10 
QuestionInsert Data In Database Pin
InvXeesh14-Jun-09 23:51
InvXeesh14-Jun-09 23:51 
Hi i want to know how to Insert Data Into Database table from textbox on button click..?
Here's my codes..

<br />
<br />
namespace DataBindingListBox<br />
{<br />
    /// <summary><br />
    /// Interaction logic for Window1.xaml<br />
    /// </summary><br />
    public partial class Window1 : Window<br />
    {<br />
        public SqlConnection connection; <br />
        public SqlCommand command; <br />
        string sql = "Select Number From Tnumber";<br />
        string connectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True";<br />
        <br />
        public Window1()<br />
        {<br />
            InitializeComponent();<br />
        }<br />
<br />
        private void Window_Loaded(object sender, RoutedEventArgs e)<br />
        {<br />
            BindData();<br />
        }<br />
<br />
        private void BindData()<br />
        {<br />
            DataSet dtSet = new DataSet();<br />
            using (connection = new SqlConnection(connectionString))<br />
            {<br />
                command = new SqlCommand(sql, connection);               <br />
                SqlDataAdapter adapter = new SqlDataAdapter();           <br />
                connection.Open();<br />
                adapter.SelectCommand = command;<br />
                adapter.Fill(dtSet, "Tnumber");<br />
                listBox1.DataContext = dtSet;              <br />
            }<br />
        }<br />
<br />
        private void BindXmlData()<br />
        {<br />
         //listBox1.DataContext = BooksData ;<br />
        }<br />
<br />
        private void button1_Click(object sender, RoutedEventArgs e)<br />
        {<br />
<br />
<br />
        }<br />
}<br />
    }

AnswerRe: Insert Data In Database Pin
himanshu256115-Jun-09 0:03
himanshu256115-Jun-09 0:03 
GeneralRe: Insert Data In Database Pin
InvXeesh15-Jun-09 0:05
InvXeesh15-Jun-09 0:05 
GeneralRe: Insert Data In Database Pin
himanshu256115-Jun-09 1:14
himanshu256115-Jun-09 1:14 
GeneralRe: Insert Data In Database Pin
Aman786Singh15-Jun-09 21:44
Aman786Singh15-Jun-09 21:44 
GeneralRe: Insert Data In Database Pin
himanshu256115-Jun-09 22:32
himanshu256115-Jun-09 22:32 
GeneralEnable TCP/IP and Named pipe in SQL Server 2005 Pin
Isaac Gordon14-Jun-09 21:33
Isaac Gordon14-Jun-09 21:33 
GeneralRe: Enable TCP/IP and Named pipe in SQL Server 2005 Pin
Niladri_Biswas17-Jun-09 20:29
Niladri_Biswas17-Jun-09 20:29 
QuestionHelp to Pivot the Following Table Pin
Vimalsoft(Pty) Ltd14-Jun-09 20:29
professionalVimalsoft(Pty) Ltd14-Jun-09 20:29 
AnswerRe: Help to Pivot the Following Table Pin
Mycroft Holmes14-Jun-09 21:18
professionalMycroft Holmes14-Jun-09 21:18 
QuestionBackup database using sql 2005 Express Edition. Pin
ram_panda0914-Jun-09 19:44
ram_panda0914-Jun-09 19:44 
AnswerRe: Backup database using sql 2005 Express Edition. Pin
Mycroft Holmes14-Jun-09 21:12
professionalMycroft Holmes14-Jun-09 21:12 
AnswerRe: Backup database using sql 2005 Express Edition. Pin
Aman786Singh15-Jun-09 1:05
Aman786Singh15-Jun-09 1:05 
AnswerRe: Backup database using sql 2005 Express Edition. Pin
Aman786Singh15-Jun-09 1:06
Aman786Singh15-Jun-09 1:06 
AnswerRe: Backup database using sql 2005 Express Edition. Pin
K030616-Jun-09 1:55
K030616-Jun-09 1:55 
QuestionUnicode Column Alias [modified] Pin
Mustafa Ismail Mustafa14-Jun-09 6:57
Mustafa Ismail Mustafa14-Jun-09 6:57 
AnswerRe: Unicode Column Alias [modified] Pin
Mycroft Holmes14-Jun-09 15:13
professionalMycroft Holmes14-Jun-09 15:13 
GeneralRe: Unicode Column Alias Pin
Mustafa Ismail Mustafa14-Jun-09 23:41
Mustafa Ismail Mustafa14-Jun-09 23:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.