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


> >
> > 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.

Read my other reply and you would see why. Why would in the world someone make accountID datatype text??? As documented in SQL server books online, comparison operators cannot be used with "text" datatype. If you really would use text datatype there then change your query to use "like". ie:

SQLEXEC(nhandle,"select acc_id_001 from headfile where ACCOUNT_ID like ?m.accountID", "h_1")


PS: Please do read what "text" datatype is for. Warn your SQL server DBA that he used a wrong datatype for accountId (may be correct but seeing the name it sounds it is somehing like "Account Id" instead of a field that stores over 8000 characters data).



Cetin Basoz

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


Support Wikipedia

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