sql statement using data environment

ejbagz
10-26-2007, 01:36 AM
hi. im trying to make a search engine in vb. the process is when i type a name in the test box, the result will show in an flexgrid.

i have this code in my text bow


with dataenvironment1
set mshflexgrid1.recordset = .rcommand1
end with


the sql statement in my sql builder is

select info.* from info
where info.name like ' &text1.text& %'


the problem is that it doesnt show the list but if i remove the where statement it shows the whole data. i want to know what is the correct sql ststement and wat is the correct syntax in displaying the result in a flexgrid:confused: :confused:

Shurik12
10-29-2007, 04:01 AM
Hi,


select * from info
where [name] like '" & text1.text & "%'"


Another thing is that you don't want to use DataEnvironment but ADO objects
instead (...)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum