Click here to Skip to main content
15,885,771 members
Home / Discussions / C#
   

C#

 
AnswerRe: CheckedListBox how to catch a event. Pin
stancrm21-Oct-09 1:33
stancrm21-Oct-09 1:33 
GeneralRe: CheckedListBox how to catch a event. Pin
JollyMansArt21-Oct-09 2:54
JollyMansArt21-Oct-09 2:54 
Questionsocket programming Pin
3bood.ghzawi21-Oct-09 0:41
3bood.ghzawi21-Oct-09 0:41 
AnswerRe: socket programming Pin
Eddy Vluggen21-Oct-09 1:00
professionalEddy Vluggen21-Oct-09 1:00 
AnswerRe: socket programming Pin
HimanshuJoshi21-Oct-09 2:10
HimanshuJoshi21-Oct-09 2:10 
QuestionNavigating through records. Pin
Minotaur-Mortal21-Oct-09 0:21
Minotaur-Mortal21-Oct-09 0:21 
AnswerRe: Navigating through records. Pin
Eduard Keilholz21-Oct-09 1:39
Eduard Keilholz21-Oct-09 1:39 
GeneralRe: Navigating through records. Pin
Minotaur-Mortal21-Oct-09 1:48
Minotaur-Mortal21-Oct-09 1:48 
Owkay, I have a feeling you are not understanding what I mean.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Connections
{
public partial class subForm : Form
{
public subForm()
{
InitializeComponent();
}

private void subForm_Load(object sender, EventArgs e)
{
buttonUpdate.Text = "Update";

string connectionString = @"Data Source=DBJNBWS0015\SQLEXPRESS;Initial Catalog=CarDealership;Integrated Security=True";
string sqlSel = @"Select * From Klient";

SqlConnection conndb = new SqlConnection(connectionString); //make a OleDbConnection object
DataSet ds = new DataSet(); //make a DataSet object

try
{
SqlDataAdapter myAdapter = new SqlDataAdapter(sqlSel, conndb); //Using the OleDbDataAdapter execute the query
myAdapter.Fill(ds, "Klient"); //Fill the DataSet with the Table 'Customers'
//dataGridView1.DataSource = ds.Tables["Klient"];
textBoxID.DataBindings.Add("Text", ds, "Klient.UserID");
textboxTitle.DataBindings.Add("Text", ds, "Klient.Title");
textBoxName.DataBindings.Add("Text", ds, "Klient.FirstName");
textBoxSurname.DataBindings.Add("Text", ds, "Klient.LastName");
textBoxLocation.DataBindings.Add("Text", ds, "Klient.City");

myAdapter.Dispose();
}
catch (Exception a)
{
MessageBox.Show("Error in connecting! " + e.ToString(), "Error");
}
finally
{
conndb.Close(); //Close the OleDbConnection
conndb.Dispose();
}
}

This simple code works. From this text boxes, I need to view the next row of data, and I have a button that inserts into a new row. before inserting, I need to make sure I am at the last row...In other words, I need to insert into a new row immediately after the last row.
GeneralRe: Navigating through records. Pin
Minotaur-Mortal27-Oct-09 2:16
Minotaur-Mortal27-Oct-09 2:16 
Questioni want send output data into pdf fromate Pin
lavankumar20-Oct-09 23:57
lavankumar20-Oct-09 23:57 
AnswerRe: i want send output data into pdf fromate Pin
Christian Graus20-Oct-09 23:57
protectorChristian Graus20-Oct-09 23:57 
GeneralRe: i want send output data into pdf fromate Pin
V.21-Oct-09 0:20
professionalV.21-Oct-09 0:20 
AnswerRe: i want send output data into pdf fromate Pin
Tom Deketelaere21-Oct-09 0:08
professionalTom Deketelaere21-Oct-09 0:08 
AnswerRe: i want send output data into pdf fromate Pin
DaveyM6921-Oct-09 0:11
professionalDaveyM6921-Oct-09 0:11 
QuestionWHY THIS CODE RETURNS ERROR Pin
RINSON VARGHESE20-Oct-09 23:54
RINSON VARGHESE20-Oct-09 23:54 
AnswerRe: WHY THIS CODE RETURNS ERROR Pin
Christian Graus21-Oct-09 0:00
protectorChristian Graus21-Oct-09 0:00 
GeneralRe: WHY THIS CODE RETURNS ERROR Pin
RINSON VARGHESE21-Oct-09 0:11
RINSON VARGHESE21-Oct-09 0:11 
AnswerRe: WHY THIS CODE RETURNS ERROR Pin
DaveyM6921-Oct-09 0:36
professionalDaveyM6921-Oct-09 0:36 
Questioncustom headers in email Pin
nirmalsat20-Oct-09 23:47
nirmalsat20-Oct-09 23:47 
AnswerRe: custom headers in email Pin
Christian Graus21-Oct-09 0:00
protectorChristian Graus21-Oct-09 0:00 
GeneralRe: custom headers in email Pin
J4amieC21-Oct-09 0:09
J4amieC21-Oct-09 0:09 
GeneralRe: custom headers in email Pin
Eddy Vluggen21-Oct-09 0:10
professionalEddy Vluggen21-Oct-09 0:10 
AnswerRe: custom headers in email Pin
J4amieC21-Oct-09 0:10
J4amieC21-Oct-09 0:10 
GeneralRe: custom headers in email Pin
nirmalsat21-Oct-09 19:38
nirmalsat21-Oct-09 19:38 
QuestionSuggestion about a data structure Pin
Siddhartha S.20-Oct-09 23:45
Siddhartha S.20-Oct-09 23:45 

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.