Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Float Data Type
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01089757
Message ID:
01089792
Vues:
30
Ok, I have another problem with this code.

SWL is reporting "The name 'JVILLAGOMEZ' is not permitted in this context. Only constants, expressions,
or variables allowed here. Column names are not permitted."

It must be referencing the 'user_name' column, but I don't see why.

Here's the CREATE TABLE code again:
sCommand = "create table Recon_Info (" +;
           "id int IDENTITY NOT NULL, " +;
           "media_order_detail_id int NOT NULL, " +;
           "user_name CHAR(40) NOT NULL, " +;
           "invoice_no CHAR(40) NOT NULL, " +;
           "batch_no CHAR(8) NOT NULL, " +;
           "status CHAR(1) NOT NULL, " +;
           "done_date_time datetime NOT NULL, " +;
           "invoice_date datetime NOT NULL, " +;
           "due_date datetime NOT NULL, " +;
           "from_date datetime NOT NULL, " +;
           "to_date datetime NOT NULL, " +;
           "invoice_notes char(128), " +;
           "adjustment_amt float(8) " +;
           ")"
Here's the INSERT command:
sCommand = "insert into Recon_Info (" +;
           "media_order_detail_id, " +;
           "user_name, " +;
           "invoice_no, " +;
           "batch_no, " +;
           "status," +;
           "done_date_time, " +;
           "invoice_date, " +;
           "due_date, " +;
           "from_date, " +;
           "to_date , " +;
           "invoice_notes, " +;
           "adjustment_amt" + ;
           ") values (" +;
           TRANSFORM(Commits.DtId) + ", " +;
           Commits.UserId + ", " +;
           Commits.InvoiceId + ", " +;
           Commits.BatchId + ", " +;
           IIF(Commits.Scanned, 'P', Commits.Status) + ", " +;
           cDoneDate + ", " +;
           cInvDate + ", " +;
           cDueDate + ", " +;
           cFromDate + ", " +;
           cToDate + ", " +;
           Commits.Notes + ", " +;
           TRANSFORM(Commits.AdjAmt) + ", " +;
           ")"
>The SQL Server Books Online (BOL) are installed with SQL Server clients tools. You can download the latest version from http://www.microsoft.com/downloads/details.aspx?FamilyID=a6f79cb1-a420-445f-8a4b-bd77a7da194b&DisplayLang=en
>
>>Got it. Thanks.
>>
>>Where is BOL? Do you have a link to it?
>>
>>
>>
>>>The syntax is FLOAT(n). See BOL for details.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform