• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFinsert (another route - from previous post)

New Here ,
Jul 13, 2010 Jul 13, 2010

Copy link to clipboard

Copied

I query a "Clientsinfo" table to get the LASTNAME,FIRSTNAME from a "form" being submited base on a phonenumber in the form.

Now I want to INSERT the form fields - Plus the query above - LASTNAME,FIRSTNAME.

I used: 
   
<CFINSERT DATASOURCE="storefront" TABLENAME="sales" formFields = "client_id,booksales,booktitle,lastname,firstname">

It works - BUT the LASTNAME OR FIRSTNAME does NOT get inserted.  The fields are blank.

Do I make things difficult or what??? 

TOPICS
Advanced techniques

Views

520

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 13, 2010 Jul 13, 2010

Copy link to clipboard

Copied

Couple of questions so we can help you out:

1. What database type?

2. When you say that "it works" does that mean that you verified that a new record appeared in the table?

3. If a new record appeared, what other data from your form variables were successfully entered?

4. If you do a CFDUMP of the form scope prior to the CFINSERT, are the form fields populated?

-reed

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 13, 2010 Jul 13, 2010

Copy link to clipboard

Copied

LATEST

It's an Access db.  The table has lastname,firstname as fields.  So when I do the insert, all the other data from the "form" salesdate, totalsale, clientID is all inserted... except lastname,firstname from the query of the 2nd table.

I am going to try what you posted eariler about query of TWO tables at the same time.  That is really what I want but I was trying to take another route.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation