View Single Post
Old 02-03-2011, 10:56 AM   #2
jmichae3
 
Join Date: Dec 2010
Posts: 366
Default

I thought VB or BASIC and probably thus ASP uses & instead of + to join strings?

somehow I don't think this is javascript... looks like BASIC to me. so change
Code:
rsRicerca_cmd.CommandText = "SELECT * FROM table WHERE field LIKE '%" & Replace(?, "'", "''") & "%' AND select_field = ? ORDER BY name DESC"
I suggest for your own sanity's sake that you come up with better table and field names, especially after 6 months down the road when you need to look at your code again and you have forgotten what-in-the-world-you-were-thinking-when-you-wrote-this.


good descriptive names for things and good comments makes for readability and debuggability later.
jmichae3 is offline   Reply With Quote