philo71
Messages postés28Date d'inscriptionvendredi 10 novembre 2000StatutMembreDernière intervention10 mars 2008
-
7 mars 2006 à 15:40
imfloflo
Messages postés2Date d'inscriptionmercredi 7 juillet 2004StatutMembreDernière intervention15 novembre 2006
-
15 nov. 2006 à 09:16
Bonjour,
Je développe un appli en C# 2003 avec SQL serveur 2000.
je cherche des infos sur les datasets typés, j'ai quelques questions a vous poser.
Je consoit le formulaire commande qui est composé de 4 tables : table_client,table_article,table_commande,table_ligne_commande.
Dans mon code je manipule 2 tables pour commencer, table_commande et table_client, mon dataset typé s'appel "Dataset_command".
Le workspace me renvoit aucune erreur mais il ne m'affiche pas les données dans mes datagrid, voici mon code :
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
//using System.Data.SqlClient.SqlDataAdapter;
using System.Data;
protected
const
string CONNECTION_ERROR_MSG = "To run this sample, you must have SQL or MSDE with the Northwind database installed. For instructions on installing MSDE, view the ReadMe file.";
//public
static SqlDataAdapter da =
new SqlDataAdapter(cmd);
// c'est ici que c'est intéréssant
// affichage du select
SqlConnection connexion =
new SqlConnection(connectionString);
SqlDataAdapter daClient =
new SqlDataAdapter("SELECT num_client ,nom_client , prenom_client, adr_client , tel_client FROM table_client ",connexion);
//Création du Premier DataAdpater pour la Table commande
SqlDataAdapter daCommande =
new SqlDataAdapter("SELECT num_commande,num_c_client,num_c_ligne_commande, desi_commande FROM table_commande",connexion);