Création de base de données dynamique

TKinslayer Messages postés 13 Date d'inscription dimanche 28 avril 2002 Statut Membre Dernière intervention 18 juillet 2002 - 17 juin 2002 à 14:05
TKinslayer Messages postés 13 Date d'inscription dimanche 28 avril 2002 Statut Membre Dernière intervention 18 juillet 2002 - 18 juin 2002 à 02:03
Voila, je sais comment créer des base de donnees avec les methodes VB (database), et des table mais quand je veut créer un nouveau champ, je peut le definir en tant qu'entier, que chaine, etc... mais je n'arrive pas à le definir en "Numéro automatique". Comment dois-je faire ?

"You must choose, Rand," Moiraine said. "The world will be broken whether you break it or not. Tarmon Gai'don will come, and that alone will tear the world apart. Will tou still try to hide from what you are, and leave the world to face the last battle undefended ?"

4 réponses

cs_Charlie Messages postés 110 Date d'inscription jeudi 9 mai 2002 Statut Membre Dernière intervention 11 mars 2010 1
17 juin 2002 à 22:13
Allo...
Si tu travailles avec ADOX ou DAO... tu peux allé sur ce lien et ca dit pas mal de truc sur Excel...

http://www.microsoft.com/france/outils/imprime/info.asp?mar=/FRANCE/MSDN/Technologies/technos/dataaccess/info/migration_DAO_ADO.html&css=/france/windows/ms.css&#wpmigratingopening

pour ce qui est de ton auto-incrément...

c'est une propriété des colonnes...

col.properties("autoincrement")=true (ADOX)
ou fld.attributes=dbautoincrfield

Ainsi, si c'est pas clair, va sur le link et recherche l'une ou l'autre des lignes de codes que je t'ai mis. Tu vas avoir un exemple qui modifie une table existante!
0
TKinslayer Messages postés 13 Date d'inscription dimanche 28 avril 2002 Statut Membre Dernière intervention 18 juillet 2002
18 juin 2002 à 01:22
Le problème avec ta solution est qu'elle fonctionne uniquement sous Excell, mais moi j'utilise DAO 3.6 sous un environnement de developpement Visual Basic (6.0)

"You must choose, Rand," Moiraine said. "The world will be broken whether you break it or not. Tarmon Gai'don will come, and that alone will tear the world apart. Will tou still try to hide from what you are, and leave the world to face the Last Battle undefended"
0
cs_Charlie Messages postés 110 Date d'inscription jeudi 9 mai 2002 Statut Membre Dernière intervention 11 mars 2010 1
18 juin 2002 à 01:41
Désolé Pépitos mais tu es dans les patates...

Je suis sous VisualBasic 6, service pack 5...

Par ailleurs, le link que je t'ai envoyé fait référence à MSDN qui est l'aide officiel de M.Gates pour son Visual Basic qui bogue a tout bout de champ!

Ainsi... vas sur le link... fait une recherche dans la page avec autoincrement ou dbautoincrfield (pour DAO) et ca va marcher! Je le sais, mon application est basé sur ce lien... je l'avais commencé en DAO mais comme j'aimais plus ou moins ca, j'ai migré vers ADO!
0
TKinslayer Messages postés 13 Date d'inscription dimanche 28 avril 2002 Statut Membre Dernière intervention 18 juillet 2002
18 juin 2002 à 02:03
Ok merci, j'ai trouvé, pour ADO et DAO en fait, c'était vraiment tout con et je me demande comment j'ai fait pour louper ca.

"You must choose, Rand," Moiraine said. "The world will be broken whether you break it or not. Tarmon Gai'don will come, and that alone will tear the world apart. Will tou still try to hide from what you are, and leave the world to face the Last Battle undefended ?"
0
Rejoignez-nous