•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Community Introductions section within the Coffee House category of DaniWeb, a massive community of 402,918 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,210 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Community Introductions advertiser: Programming Forums
Views: 132 | Replies: 4
![]() |
•
•
Join Date: Jul 2008
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi my name is John from I U.K.. Have only recently got back into progarmming following the death of my wife in April this year, so could really do with help on a few things I am trying at the mo!
Other than computers my other interests are my lovely American Bulldod, Dixie, music(Bowie/Pistols/Nirvana/Paul Weller and all things goth!!), fishing and long walks in the countryside.. Anyway, the immediate problem I have is building an SQL string with possible parameters, but I get a missing operator error when I try and open the recordset. The code is as follows. The choice parameter is a radio button choice. I haven't got as far as passing dates yet. Please could someone help.
Kind Regards
John
'---------------------------------------------------------------------------
' Function: strbuildSQLstr
' Purpose: Build SQL String to retrieve ADO Recordset
' Paramters: strChoice- string(Good or Bad),strStart- string(start date)
' strEnd - string( End Date)
' Returns: String - SQL Statement build with parameters passed
'---------------------------------------------------------------------------
Function strbuildSQLstr(strChoice As String) As String
Dim strtemp As String
strtemp = "Select * from SizeRange Where Style =" & "'" & txtStyle & "'"
If strChoice > "" Then strtemp = strtemp & "'" & " and WHERE type =" & "'" & strChoice & "'"
' return the SQL String
strbuildSQLstr = strtemp & " " & "ORDER by Date"
Other than computers my other interests are my lovely American Bulldod, Dixie, music(Bowie/Pistols/Nirvana/Paul Weller and all things goth!!), fishing and long walks in the countryside.. Anyway, the immediate problem I have is building an SQL string with possible parameters, but I get a missing operator error when I try and open the recordset. The code is as follows. The choice parameter is a radio button choice. I haven't got as far as passing dates yet. Please could someone help.
Kind Regards
John
'---------------------------------------------------------------------------
' Function: strbuildSQLstr
' Purpose: Build SQL String to retrieve ADO Recordset
' Paramters: strChoice- string(Good or Bad),strStart- string(start date)
' strEnd - string( End Date)
' Returns: String - SQL Statement build with parameters passed
'---------------------------------------------------------------------------
Function strbuildSQLstr(strChoice As String) As String
Dim strtemp As String
strtemp = "Select * from SizeRange Where Style =" & "'" & txtStyle & "'"
If strChoice > "" Then strtemp = strtemp & "'" & " and WHERE type =" & "'" & strChoice & "'"
' return the SQL String
strbuildSQLstr = strtemp & " " & "ORDER by Date"
•
•
Join Date: May 2008
Posts: 543
Reputation:
Rep Power: 2
Solved Threads: 1
Hi John:
Welcome.
Feel free to post your inquiry in the appropriate forum here.
Welcome.
Feel free to post your inquiry in the appropriate forum here.
Self-Help Books - Guides to Improve Your Life
Online Travel Agent Program - Live the life of a Travel Agent
Tutoring - Tutoring Help
Term Papers - Term Paper Help
Online Travel Agent Program - Live the life of a Travel Agent
Tutoring - Tutoring Help
Term Papers - Term Paper Help
•
•
Join Date: May 2008
Location: Hyderabad, India
Posts: 258
Reputation:
Rep Power: 1
Solved Threads: 27
Welcome to Daniweb forums....
Thanx,
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
Sreekanth
www.saap.in
if you problem solved add me as a reputation and mark it mark as solved
![]() |
•
•
•
•
•
•
•
•
DaniWeb Community Introductions Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the Community Introductions Forum
- Previous Thread: Hello everyone !
- Next Thread: Greetings all



Linear Mode