Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create table in sql express 2005
Message
 
À
05/04/2006 11:41:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01110651
Message ID:
01110656
Vues:
10
>how to create a table in sql express 2005 ???
** Change connection string to the real one
sqlH = SQLSTRINGCONNECT([Driver = SQL Server;Server=ServerName\SQLEXPRESS;Trusted_Connection=yes])
IF sqlH < 0
   AERROR(laError)
   MESSAGEBOX([Failed to connect to server: ]+ laError[1,2])
   RETURN
ENDIF
TEXT TO lcSql NOSHOW TEXTMERGE PRETEXT 15
     CREATE TABLE Test (Field1 varchar(20),
                        Field2 int)
ENDTEXT
IF SQLEXEC(sqlH, m.lcSql) > 0
   *** Sucess
ELSE
   AERROR(laError)
   MESSAGEBOX([Failed to create a table: ]+ laError[1,2])
ENDIF
SQLDISCONNECT(sqlH)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform