Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating SQL Files from VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01204946
Message ID:
01205055
Vues:
20
You don't need WHERE clause to delete all records. All records will be deleted when WHERE clause is not present.
DELETE FROM MyTable
> Sounds like your connection string is not accurate. try this site for some help setting p a connection string: http://www.connectionstrings.com/?carrier=sqlserver2005
>
> Your connection string will vary depending on how your Sql Server is set up. Might take a little trial and error.
>
> As far as how to delete the contents of a table with SQL pass thru, here is a very simple example:
>
>
>
>LOCAL Connectionhandle, ConnectionString
>
>ConnectionString = "Driver=SQL Server; Server=MyComputerName\MyServerName; Database=MyDatabase"  &&  input your connection string
>
>SQLSTRINGCONNECT(ConnectionString)
>
>ConnectionHandle = SQLEXEC(ConnectionHandle, 'DELETE FROM MyTable WHERE 1 = 1', 'TempCursor')
>
>SQLDISCONNECT(ConnectionHandle)
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform