Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Dilip Kumar
  Where is Dilip Kumar?
 Hyderabad
 India
 Dilip Kumar
 To: Cecil Champenois
  Where is Cecil Champenois?
 Little Elm
 Texas - United States
 Cecil Champenois
 Tags
Subject: RE: Data Type Mismatch
Thread ID: 310595 Message ID: 310665 # Views: 27 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Thursday, June 23, 2011 9:18:34 AM         
   


> I keep getting an error message in my INSERT command that says that the data types are not matched.
>
> I just ran an INSERT of live data at the Command window and the data was able to be inserted. I am thinking it is more in how I laid out the field names (column names), or how I did the syntax. I cannot get the INSERT to work as it is. I have 12 cursors which is why I have "tmp" with a month variable.
>
> Cecil
>
>

> * Loop through all 12 months of cursors.
> FOR nMonth = 1 TO 12
> lcMonth = PADL(nMonth, 2, "0")
> CREATE CURSOR ("tmpNearly"+lcMonth) (Carr_Name C(45), CarrID C(5), ;
> GrpName C(10), GrpID C(3), EMP_ID C(10), PlanKey C(3), Benefit C(12), ;
> Billed N(10), Collected N(10), Annualized N(10), Lives N(10))
> lcCursor=("tmp3rdJoin"+lcMonth)
> SELECT (lcCursor)
> * Loop through tmp3rdJOIN monthly cursors.
> SCAN
> INSERT INTO ("tmpNearly"+lcMonth) (;
> GrpID, ;
> Emp_ID, ;
> PlanKey, ;
> Benefit, ;
> Billed, ;
> Collected, ;
> Annualized, ;
> Lives) ;
> VALUES (;
> "tmp3rdJoin"+lcMonth+".GrpID", ;
> "tmp3rdJoin"+lcMonth+".Emp_ID", ;
> "tmp3rdJoin"+lcMonth+".PlanKey",;
> " ", ;
> "tmp3rdJoin"+lcMonth+".Billed", ;
> "tmp3rdJoin"+lcMonth+".Collected", ;
> "tmp3rdJoin"+lcMonth+".Annualized", ;
> "tmp3rdJoin"+lcMonth+".Lives")
> ENDSCAN
>
> ENDFOR
>

> Cecil Champenois, Jr.


hi cecil,

you not shown your "tmp3rdjoin" structure here.
please provide structure, so that we can find out.

Thanks,
Dilip.

ENTIRE THREAD

Data Type Mismatch Posted by Cecil Champenois @ 6/22/2011 8:30:55 PM
RE: Data Type Mismatch Posted by Anders Altberg @ 6/22/2011 8:45:03 PM
RE: Data Type Mismatch Posted by onytoo @ 6/23/2011 4:36:10 AM
RE: Data Type Mismatch Posted by frank sinatha @ 6/23/2011 5:11:33 AM
RE: Data Type Mismatch Posted by Dilip Kumar @ 6/23/2011 9:18:34 AM