Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Pass Through Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01063586
Message ID:
01063701
Vues:
9
>I'm trying to form an INSERT INTO string and run it:
>
>
>sSqlCommand = "insert into syserrors "+;
>  "(datetime, error, line, message, codeline, program," +;
>  "user, appname, memory, status, callstack, notified)"+;
>  " values "+;
>  "("+ sDateTime + "," +;
>  sErrNo + "," +;
>  sLineNo + "," +;
>  "'" + sErrMessage + "' ," +;
>  "'" + sLineOfCode + "' ," +;
>  "'" + sProgram + "' ," +;
>  "'" + sUserId + "' ," +;
>  "'" + sAppName + "' ," +;
>  "'" + sMemory + "' ," +;
>  "'" + sStatus + "' ," +;
>  "'" + sStack + "' ," +;
>"0)"
>
>
>After running this the string looks like:
>
>
>insert into syserrors (datetime, error, line, message, codeline, program, user, appname,
>memory, status, callstack, notified)
>values
>(10/31/2005 07:40:27,1000,5000,'TEST MESSAGE' ,'TEST CODE LINE' ,'TEST PROGRAM' ,'KMAROIS'
>,'TEST' ,'' ,'' ,'TEST STACK' ,0)
>
>
>
>SQL Server is returning the error "Incorrect syntax near '07'.
>
>Notice the DateTime value. It seems to be appearing as a string. Anyone know how
>to solve this?
VALUES
('20051031 07:40:27',1000,5000,'TEST ....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform