Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Kazi Hasan Mahamud
  Where is Kazi Hasan Mahamud?
 dhaka
 Bangladesh
 Kazi Hasan Mahamud
 To: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 Tags
Subject: RE: SQL Connectivity and store data in curso
Thread ID: 345414 Message ID: 345536 # Views: 30 # Ratings: 0
Version: Visual FoxPro 7 Category: ODBC, ADO and OLEDB
Date: Thursday, May 24, 2012 7:21:16 AM         
   


> > Dear friend
> >
> > when i write the code no 1 then the data store in the cursor h_1
> >
> > code no 1
> >
> > nhandle = SQLCONNECT('SQLcon')
> > IF nhandle >0
> > sqlquery = SQLEXEC(nhandle,"select acc_id_001 from headfile","h_1")
> > select h_1
> > endif
> >
> > But when i write the code no 2 then the following message arises. In this code i use where clase. Under the following code no data store in cursor h_1
> >
> > error message :
> >
> > Connectivity error:[Microsoft][ODBC SQL Server Driver][SQL
> > Server] The data types text and varchar are incompatible in the
> > equal to operator
> >
> > Code no 2
> >
> > nhandle = SQLCONNECT('SQLcon')
> > IF nhandle >0
> > sqlquery = SQLEXEC(nhandle,"select acc_id_001 from headfile;
> > where ACCOUNT_ID='"+ALLTRIM(This.Value)+"'","h_1")
> > select h_1
> > endif
>
> This may not solve your problem but anyway first do it the right way:
>
>
nhandle = SQLCONNECT('SQLcon')
> IF m.nhandle >0
>    local accountID
>    accountID = ALLTRIM(This.Value)
>    sqlquery = SQLEXEC(nhandle,"select acc_id_001 from headfile where ACCOUNT_ID=?m.accountID","h_1")		
>    select h_1
> endif

>
> What is the datatype of accountId?
>
>

> Cetin Basoz
>
> .Net has got better.Think about moving - check my blog:
> My Blog
> Blog (mirror) - sounds to be down
>

> Support Wikipedia


I am failed to store data in cursor H_1. Account_id is text data field and store in table 'x' is also text field. error occured when i use "where" clause. if not use where clause then store the data in cursor h_1. Why where clause mismatch.

ENTIRE THREAD

SQL Connectivity and store data in curso Posted by Kazi Hasan Mahamud @ 5/23/2012 9:15:03 AM
RE: SQL Connectivity and store data in curso Posted by Cetin Basoz @ 5/23/2012 10:21:27 AM
RE: SQL Connectivity and store data in curso Posted by Kazi Hasan Mahamud @ 5/23/2012 11:37:16 AM
RE: SQL Connectivity and store data in curso Posted by Cetin Basoz @ 5/23/2012 12:40:31 PM
RE: SQL Connectivity and store data in curso Posted by Kazi Hasan Mahamud @ 5/24/2012 7:21:16 AM
RE: SQL Connectivity and store data in curso Posted by Cetin Basoz @ 5/24/2012 1:40:33 PM
RE: SQL Connectivity and store data in curso Posted by Michel Levy @ 5/24/2012 2:15:44 PM
RE: SQL Connectivity and store data in curso Posted by Cetin Basoz @ 5/24/2012 2:47:54 PM
RE: SQL Connectivity and store data in curso Posted by Michel Levy @ 5/24/2012 3:56:08 PM