If you use JDBC prepared statements, you will not have to worry about SQL
injection.
Paul
On Fri, Mar 22, 2013 at 6:36 PM, J.V. wrote:
> Does anyone out there have a method I could use to pass a form field
> variable that would check for all known SQL injection vulnerabilities (with
>
Use Filter
On 3/22/2013 7:36 PM, J.V. wrote:
Does anyone out there have a method I could use to pass a form field
variable that would check for all known SQL injection vulnerabilities
(with regards to the form field only, irrespective of the method of
SQL execution) and return a true/false if
Does anyone out there have a method I could use to pass a form field
variable that would check for all known SQL injection vulnerabilities
(with regards to the form field only, irrespective of the method of SQL
execution) and return a true/false if it passes the test?
I have about 100+ forms
I'd like to make sure we don't turn the list into a Struts2Builder forum.
Thomas wrote:
> Bruce wrote:
> Also why cannot the maven compiler settings be set to generate Java 1.6
> > instead of Java 1.5?
>
> I just didn't see a reason to do so, since EE 1.5 is still prevalent in
> the world.
>
JE
Hello Bruce. Thanks for writing, and thanks for trying Struts2Builder.
> It worked well generating a complete Struts 2 CRUD web application. I
used on
> Mac OS 10.8.1 and with MySQL.
That's good to hear. I am glad you got it working on Mac. I have not
tested it there, and I haven't heard of a
0-has-been-released-now-with-support-for-Oracle-Sybase-and-MS-SQL-Server-tp5710530p5710540.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional c
Greetings all.
Struts2Builder version 0.5.0 has been released.
Struts2Builder is a Java code generation system that can automatically
build a real, live, functioning Struts2 / Hibernate / Spring system for any
existing Oracle, MySQL, PostgreSQL, Microsoft SQL Server, or Sybase
database
ject: RE: generate SQL Hibernate Query using session
Jerson -
What I would likely suggest you consider is creating a DTO object that
resembles your result from the SQLQuery. You can then use one of the
stock Hibernate Transformers to convert the SQL results into instances
of this DTO Bean and t
Users Mailing List
Subject: RE: generate SQL Hibernate Query using session
Jerson -
What I would likely suggest you consider is creating a DTO object that
resembles your result from the SQLQuery. You can then use one of the
stock Hibernate Transformers to convert the SQL results into instances
of
Jerson -
What I would likely suggest you consider is creating a DTO object that
resembles your result from the SQLQuery. You can then use one of the
stock Hibernate Transformers to convert the SQL results into instances
of this DTO Bean and then you can return the beans to your view to
iterate
I think you may use the Composite Class in Hibernate.
Query q = session.createQuery
(" select new NewCompositeClass(members, classInfo.className) " +
" from Members members, ClassInfo classInfo " +
" where members.level = classInfo.classCode ");
and you need a class:NewCompositeClass.java
error...I
couldn't find any
Thanks in advance
Many Thanks and Regards,
Jerson
From: Jerson John [mailto:jer...@cprvision.com]
Sent: Friday, February 18, 2011 10:53 AM
To: 'Struts Users Mailing List'
Subject: RE: generate SQL Hibernate Query using session
Hi,
Thanks for your
ce in properties.Please advice me a approach
for thisThanks in advance
Many Thanks and Regards,
Jerson
-Original Message-
From: Dave Newton [mailto:davelnew...@gmail.com]
Sent: Friday, February 18, 2011 10:34 AM
To: Struts Users Mailing List
Subject: Re: generate SQL Hibernate Query using se
What does having joins have to do with not being able to map to your data
model?
Dave
On Feb 17, 2011 8:43 PM, "Jerson John" wrote:
> Hi,
> I am trying to generate SQL query using session.createSQLQuery and
> returning the list object..This select query contains joins an
Hi,
I am trying to generate SQL query using session.createSQLQuery and
returning the list object..This select query contains joins and so it cannot
be mapped to any of my model objects.How can I now get the values in my jsp
page using iterator tag in Struts 2...
Please help me on this
Many
use hibernate its definitely worth trying.
the SQL queries can be parameterised and the parameter names can refer to
fields in an object, it handles the escaping of values to be sql safe.
> From: gustavo.felisbe...@wit-software.com
> To
Hello,
As far as I know there is nothing in struts to prevent SQL injection. And
that should be done at the database level, so it is not related to Struts.
Also there is no simple way of making parameters "sql injection safe". You
can take a look at
http://www.owasp.org
Hi,
Do we have any special technique in Struts for preventing sql injection, i
know we can prevent it via parameterized query , but my application design
do not permit so,
So can anyone here help me on this, i need a function whom if i pass a
value, it becomes sql injection safe.,
Pl. help
Your trouble is here:
pstmtname = conn.prepareStatement(sql);
sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID =
" + UserID;
When you call prepareStatement(sql) the sql string is sent to the database
which "prepares" it (essentially does all
Connection conn = null;
> PreparedStatement pstmtname = null;
> pstmtname = conn.prepareStatement(sql);
> sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID
> =
> " + UserID;
> pstmtname.setString(1, "123456");
> pstmtname.executeQuery();
Move your sql before the prepared statement.
Sql =" sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ?
WHERE ROW_ID = ?";
pstmtname = conn.prepareStatement(sql);
pstmtname.setString(1, "123456");
pstmtname.setString(2, UserID);
pstmtname.executeQuery();
This
09/12/8 Sushim Saini
> > >
> > > > hi Nguyen Xuan Son
> > > > use
> > > > pstmtname.executeQuery() instead of pstmtname.executeQuery();
> > > >
> > > > On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son
> > wrote:
>
29, Nguyen Xuan Son
> wrote:
> > >
> > > > dear all
> > > > I've written
> > > > Connection conn = null;
> > > > PreparedStatement pstmtname = null;
> > > > pstmtname = conn.prepareStatement(sql);
> > > > sql = "UPDATE t
instead of pstmtname.executeQuery();
> >
> > On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son wrote:
> >
> > > dear all
> > > I've written
> > > Connection conn = null;
> > > PreparedStatement pstmtname = null;
> > > pstmtname =
#x27;ve written
> > Connection conn = null;
> > PreparedStatement pstmtname = null;
> > pstmtname = conn.prepareStatement(sql);
> > sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE
> ROW_ID
> > =
> > " + UserID;
> > pstmtname.
hi Nguyen Xuan Son
use
pstmtname.executeQuery() instead of pstmtname.executeQuery();
On Tue, Dec 8, 2009 at 11:29, Nguyen Xuan Son wrote:
> dear all
> I've written
> Connection conn = null;
> PreparedStatement pstmtname = null;
> pstmtname = conn.prepareStatement(sq
dear all
I've written
Connection conn = null;
PreparedStatement pstmtname = null;
pstmtname = conn.prepareStatement(sql);
sql = "UPDATE tbl_content_admin_accounts SET CA_PASSWORD = ? WHERE ROW_ID =
" + UserID;
pstmtname.setString(1, "123456");
pstmtname.executeQuery();
nough information about the production
usage situation before tuning it.
John
On Fri, Jun 19, 2009 at 11:16 AM, Edward Song wrote:
> Here's a Friday discussion.
>
> As an application developer, I can write SQL pretty well, but I wouldn't
> say
> that I'm an expert.
If you have the code in a workable configuration, you can test it
easily with a SQL query job using SLAMD (http://slamd2.dev.java.net).
This generate load that may point to indexing problems and other
performance-related problems.
On Jun 19, 2009, at 11:16 AM, Edward Song wrote:
Here
Here's a Friday discussion.
As an application developer, I can write SQL pretty well, but I wouldn't say
that I'm an expert. My last project I did run into some design and
architecture issues that needed a little bit of reworking and
refactoring. To help avoid this, I want to
I will be out of the office, and mostly without email access, until Dec 1.
Please contact the One World office, 605-845-7172, with any general needs, and
Danny Nickels, [EMAIL PROTECTED], at the same number, for any technical or
integration issues.
If this is an emergency, please feel free to c
b_App_Struts/
>
> You can use above link to have brief idea.
>
>
> -Original Message-
> From: Carlos Iglesias [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 26, 2008 3:16 PM
> To: user@struts.apache.org
> Subject: Dummy example Struts 2.0 - My Sql
>
>
:16 PM
To: user@struts.apache.org
Subject: Dummy example Struts 2.0 - My Sql
Hello,
I'm beginning wity Struts and I found the samples very useful, expecially
the app struts2-showcase-2.0.11.2.war.
But I'd need other sample to begin my own to make my owns aplications.
¿Is there any sample
Hello,
I'm beginning wity Struts and I found the samples very useful, expecially
the app struts2-showcase-2.0.11.2.war.
But I'd need other sample to begin my own to make my owns aplications.
¿Is there any sample of struts2 with mysql?
¿Can anyone send my an url?
Thanks in advance.
Carlos Iglesia
"Optimistic locking" will give you some information. One way to do
this is to have a column in your database table that denotes a version
number, which is incremented every time the row changes. Include that
value in your form, and then you will be able compare the form version
to the database vers
Hi!!
I know this is not struts question but I don't know this term so I cannot
search the internet fot it.
Two users are seeing the same page (data from database), and both of them
are editing the same
piece of data however, the other user submits the changes (update/delete)
first.
I need to inf
f the following link:
> http://www.net-security.org/dl/articles/IntegrigyIntrotoSQLInjectionAttacks.pdf
>
> Thx.
>
> Mike
>
>
> --- On Thu, 11/15/07, Antonio Petrelli <[EMAIL PROTECTED]> wrote:
>
> > From: Antonio Petrelli <[EMAIL PROTECTED]>
> > Subject: Re: Struts Val
Hi Mike.
my comments below.
Mike Duffy wrote:
Thx Gary.
That is good information.
We are actually using JBoss with EJB 3.0, which uses Hibernate under
the covers, so I am assuming we are covered.
Not that sure.. if your DAO uses SQL strings in the queries (Hibernate
lets you do that
2007/11/15, Mike Duffy <[EMAIL PROTECTED]>:
> No matter where this is done, the basic problem is we have single quotes,
> double quotes, ampersands, semicolons, and parenthesis in our data.
This may be off topic, but does not is suffice to use prepared
statement and parameters to avoid such attac
this way: you can always
create a query dinamically, with a variable number of parameters.
In the PDF you sent, there is this sentence:
SQL Statements using bind variables are generally immune to SQL
Injection attacks as the Oracle
database will use the value of the bind variable exclusively and n
: Struts Validator to Prevent SQL Injection Attacks
> To: "Struts Users Mailing List"
> Cc: [EMAIL PROTECTED]
> Date: Thursday, November 15, 2007, 11:13 AM
> Dave Newton wrote:
> > --- Mike Duffy <[EMAIL PROTECTED]> wrote:
> >> Does anyone have a gre
> Subject: Re: Struts Validator to Prevent SQL Injection Attacks
> To: "Struts Users Mailing List" , [EMAIL PROTECTED]
> Date: Thursday, November 15, 2007, 11:21 AM
> 2007/11/15, Mike Duffy <[EMAIL PROTECTED]>:
> > No matter where this is done, the basic prob
No matter where this is done, the basic problem is we have single quotes,
double quotes, ampersands, semicolons, and parenthesis in our data.
After Googleing on this topic for an hour or so I do not see an elegant
solution, other than possibly filtering on SQL key words (DROP, ALTER, etc
Dave Newton wrote:
--- Mike Duffy <[EMAIL PROTECTED]> wrote:
Does anyone have a great solution for a validator
that will prevent users from entering malicious SQL
into form entry text fields?
I'm not sure that belongs in a validator; unless you
never need to allow the use of a s
return error if (AND / OR / == ) or any possible SQLInjections are found
http://www.acunetix.com/websitesecurity/sql-injection2.htm
XSS Scripting
solution might use
JS Validator to scan for html tags in the input form or table or input comes
to mind
but just in case JS validatpr passes it on the
Does anyone have a great solution for a validator that will prevent users from
entering malicious SQL into form entry text fields?
Thx.
Mike
Get easy, one-click access to your favorites.
Make Yahoo
--- Mike Duffy <[EMAIL PROTECTED]> wrote:
> Does anyone have a great solution for a validator
> that will prevent users from entering malicious SQL
> into form entry text fields?
I'm not sure that belongs in a validator; unless you
never need to allow the use of a single
2007 13:19
To: 'Struts Users Mailing List'
Subject: RE: using jstl sql tags for displaying date from database
Ok thanks for your reply n showing me the way. It seems you didn't get my
question write. Let me explain it to you...
When I query the database normally using tag I get a
ct sysdate from dual"?
The whole application is based upon struts framework. I have used struts
1.2.9. I thought jstl sql tag would be a better option to execute such small
query since it's very simple. So, I'm trying to get it done using jstl. Can
u help?
AM
-Original Mes
On 05/06/2007, at 9:46 PM, Ambaris Mohanty wrote:
Do u have the solution or just wasting my time???
-Original Message-
From: Al Sutton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 05, 2007 5:09 PM
To: 'Struts Users Mailing List'
Subject: RE: using jstl sql tags for displaying
--- Ambaris Mohanty wrote:
> Do u have the solution or just wasting my time???
The irony here is thick enough to slice.
d.
Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel
a
with students when I worked at a
university).
-Original Message-
From: Ambaris Mohanty [mailto:[EMAIL PROTECTED]
Sent: 05 June 2007 12:47
To: 'Struts Users Mailing List'
Subject: RE: using jstl sql tags for displaying date from database
Do u have the solution or just wasting my
Do u have the solution or just wasting my time???
-Original Message-
From: Al Sutton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 05, 2007 5:09 PM
To: 'Struts Users Mailing List'
Subject: RE: using jstl sql tags for displaying date from database
And the reason these aren'
And the reason these aren't synchronized using NTP or a similar protocol
would be...?
-Original Message-
From: Ambaris Mohanty [mailto:[EMAIL PROTECTED]
Sent: 05 June 2007 12:33
To: 'Struts Users Mailing List'
Subject: RE: using jstl sql tags for displaying dat
4:54 PM
To: 'Struts Users Mailing List'
Subject: RE: using jstl sql tags for displaying date from database
And the reason for not using the server time would be..?
-Original Message-
From: Ambaris Mohanty [mailto:[EMAIL PROTECTED]
Sent: 05 June 2007 12:21
To: 'Strut
And the reason for not using the server time would be..?
-Original Message-
From: Ambaris Mohanty [mailto:[EMAIL PROTECTED]
Sent: 05 June 2007 12:21
To: 'Struts Users Mailing List'
Subject: RE: using jstl sql tags for displaying date from database
I want to display the sa
I want to display the same time in all the client machines irrespective of
their location.
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 05, 2007 4:34 PM
To: Struts Users Mailing List
Subject: Re: using jstl sql tags for displaying date from database
--- Ambaris Mohanty wrote:
> And I want that the date should come from the
database.
Why would you want the current date to come from the
database?
d.
Got a little couch potato?
Check out fun summer a
_
From: Ambaris Mohanty [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 05, 2007 3:16 PM
To: 'user@struts.apache.org'
Subject: using jstl sql tags for displaying date from database
Hi all,
In my web application I want to put current date into the header segment of
each
Hi all,
In my web application I want to put current date into the header segment of
each page. And I want that the date should come from the database. How can I
achieve this using jstl 1.1 sql tags. Can anybody provide me a code snippet
that I can put in my jsp page?
Thank you.
Dave,
Thanks for your response. I have got your point and will try to follow
the guidelines from my next mail on.
I was basically interested in knowing all the steps that are required to
connect to a remote SQL server 2000 using Struts on JBoss.
After a night of trial and errors, I have finally
Jitendra Kumar wrote:
> Using the above I simply want to print the records of any table in my SQL
> Server 2K DB.
>
> The problem:
> I am not able to do the above. I have tried changing some files in Jboss. I
> have copied some jars of DB Drivers in WEB-INF/lib fol
I am writing this mail after spending a lot of time struggling with the
stuff mentioned in subject line.
My Setup
1. myEclipse IDE
2. Struts Version 1.1
3. JDK 1.5
4. Jboss 3.2.5 (Please don't ask me to go to Jboss mailing list :-( )
5. SQL Server 2000 (This server is running on a remot
Friday, February 03, 2006 10:25 AM
To: Struts Users Mailing List
Subject: Re: For sql experts
FROM PARTY_NOTE PN 1WHERE PN.1PARTY_ID
might have to be...
FROM PARTY_NOTE PN1 WHERE PN1.PARTY_ID
What happens if you get more than one last_update_dt equal to the
maximum?
Gluck
&qu
FROM PARTY_NOTE PN 1WHERE PN.1PARTY_ID
might have to be...
FROM PARTY_NOTE PN1 WHERE PN1.PARTY_ID
What happens if you get more than one last_update_dt
equal to the maximum?
Gluck
"Jonnalagadda, Sumithra" <[EMAIL PROTECTED]> wrote:
SELECT DEPTNUM.REF_VALUE, CAMNUM.REF_VALUE,
(
SELECT DEPTNUM.REF_VALUE, CAMNUM.REF_VALUE,
(SELECT PN1.NOTE_TEXT FROM PARTY_NOTE PN 1WHERE PN.1PARTY_ID =
DEPTNUM.PARTY_ID and max(pn1.last_update_dt)) NOTE
FROM PARTY_REFERENCE DEPTNUM,
PARTY_REFERENCE CAMNUM,
PARTY_ASSOC REL
WHERE DEPTNUM.PARTY_ID = REL.TO_PARTY_ID
AND REL.FROM_PARTY_ID = CAMN
http://opensource2.atlassian.com/confluence/oss/display/IBATIS/Quick+Start+Guide
-T.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tia,
.V
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
date String, add a day, and return sql date?
[EMAIL PROTECTED] wrote:
> [...]
> public static String addDaysToDate( String strDate, String noofDays,
> String dateFormat ) throws
Exception
noofDays? What are those? Days 30 minutes offs
[EMAIL PROTECTED] wrote:
[...]
public static String addDaysToDate( String strDate, String noofDays,
String dateFormat ) throws Exception
noofDays? What are those? Days 30 minutes offset from everywhere else? ;-)
L.
-
ate String, add a day, and return sql date?
Mick Knutson wrote:
>I need to see if anyone has a utility to take a String date, add 1 day,
>and return a java.sql.Date
>
>
I'd probably check out the Calendar class.
Dave Newton
Tech
Mick Knutson wrote:
I need to see if anyone has a utility to take a String date, add 1 day,
and return a java.sql.Date
I'd probably check out the Calendar class.
Dave Newton
Technical Lead, MonkeyLips Omnigalgomon Project
--
I need to see if anyone has a utility to take a String date, add 1 day,
and return a java.sql.Date
--
Thanks
Mick Knutson
(925) 951-4126
HP Consulting Services
Safeway (Blackhawk Fastword Project)
J2EE Architect
---
"MMS " made the following annotations.
--
In general, ActionForm validation is limited to the most basic input
validation, mostly making sure that incoming strings can be parsed
into a specific type. If you need to issue a SQL query to ensure
valid data, that sounds like a business logic operation, and probably
makes more sense in the
Hi In my HTML-Form I'm sending a number to a action.
If the number is valid will be decided by a sql-query.
I'm not sure to put this select in the ActionForms validate
method or in the action with a corresponding forward.
What would be the better way?
Thanks for an
On Wed, 2005-09-07 at 14:16 +1000, Murray Collingwood wrote:
> Thanks Jason
>
> I'm having a strange issue with serving up these images. I'm getting a
> "socket write
> error" from the following code. There are 3 images, the details follow the
> code. The
> first two images appear, the thir
Thanks Jason
I'm having a strange issue with serving up these images. I'm getting a "socket
write
error" from the following code. There are 3 images, the details follow the
code. The
first two images appear, the third fails to appear.
response.setContentLength((int) f.lengt
Oh right, you need to discover the location automatically.
Something like this might work:
request.getSession().getServletContext().getRealPath("/images");
That should give you the full path to /images.
Murray Collingwood wrote:
How do I find the path actual path to "/images" assuming of co
How do I find the path actual path to "/images" assuming of course that
"/images" is a
url reference?
Is there something like $STRUTS_ROOT?
Kind regards
mc
On 7 Sep 2005 at 14:50, Jason Lea wrote:
> I guess it depends if you are trying to restrict access to these images.
>
> To make all ima
I guess it depends if you are trying to restrict access to these images.
To make all images available for anyone, put them into /images, for example.
If you want to not allow any direct access to them, you could create a
directory under /WEB-INF and put them there. You would then have to
crea
Hi all (Gosh, I'm starting to feel like a regular on this list...)
After my experiences below I have rewritten my application to store the images
in a
local sub-directory, however when I ran this new version the sub-directory was
created
under the Tomcat/bin directory - not really appropriate.
Hi all
I got my app storing and retrieving images from MySQL database - what a mistake!
A simple image of 130k took 8 seconds to appear on the page. This is a huge
time to
sit and stare at a large blank space on the screen.
I can't help thinking that this is a bug (performance problem) somewh
inal Message-
> > From: ??? [mailto:[EMAIL PROTECTED]
> > Sent: 01 September 2005 15:09
> > To: Struts Users Mailing List
> > Subject: Re: How to pass SQL variable from JSP to Action?
> >
> > Richard
> >
> > Are you suggesting something like Hibern
> Look it up in a Struts action and place in the presentation layer via an
> ActionForm etc before showing the JSP
>
> -Original Message-
> From: ??? [mailto:[EMAIL PROTECTED]
> Sent: 01 September 2005 15:09
> To: Struts Users Mailing List
> Subject: Re: How to pass SQL
lto:[EMAIL PROTECTED]
> Sent: 01 September 2005 15:09
> To: Struts Users Mailing List
> Subject: Re: How to pass SQL variable from JSP to Action?
>
> Richard
>
> Are you suggesting something like Hibernate or iBatis?
>
> Daniel
>
>
> 2005/9/1, R. Markham <
to pass SQL variable from JSP to Action?
Richard
Are you suggesting something like Hibernate or iBatis?
Daniel
2005/9/1, R. Markham <[EMAIL PROTECTED]>:
> Hallo Nobody(??)
>
> It is bad practice to put SQL Statement in a JSP page.
>
> Regards
>
> Richard Markham
Richard
Are you suggesting something like Hibernate or iBatis?
Daniel
2005/9/1, R. Markham <[EMAIL PROTECTED]>:
> Hallo Nobody(??)
>
> It is bad practice to put SQL Statement in a JSP page.
>
> Regards
>
> Richard Markham
>
>
> -Ursprüngliche Nach
Hallo Nobody(??)
It is bad practice to put SQL Statement in a JSP page.
Regards
Richard Markham
-Ursprüngliche Nachricht-
Von: ??? [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 1. September 2005 05:30
An: Struts Users Mailing List
Betreff: Re: How to pass sql variable from jsp to
to capture the group_id
> and then update a session attribute .
>
> Then the resulting jsp is like this
>
>
> Is this a proper way to do this?
>
> I do not know how to write in the Action class so that
> it can retrieve the sql value from the passing in jsp file.
>
> Your help is very much appreicated.
>
know how to write in the Action class so that
it can retrieve the sql value from the passing in jsp file.
Your help is very much appreicated.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Erik Weber wrote:
As far as the implementation goes, there is no reason to be scared of
switches and loops. (But favor polymorphism/virtual functions over a
giant loop.) However, you should get rid of all those concat operators
and use StringBuffer.append instead. The performance will improve
s
to deal with it - I just can't find it.
I have a database containing many records
Searches can be performed on several text fields - and refined by
boolean fields.
The html form thus consist of several text inputs and several checkboxes.
Only one text box should ever be filled in.
I can w
rformed on several text fields - and refined by
boolean fields.
The html form thus consist of several text inputs and several
checkboxes.
Only one text box should ever be filled in.
I can work out the resultant sql query by using lots of if statements
as below but it just doesn't seem very
html form thus consist of several text inputs and several checkboxes.
Only one text box should ever be filled in.
I can work out the resultant sql query by using lots of if statements
as below but it just doesn't seem very elegant ...
I could also break the search down into several forms a
Rick Reumann wrote:
Look into using iBATIS http://www.ibatis.com. It's easy to use and will
handle this kind of dynamic SQL very nicel (the PDF instruction manual
is nice. Look at the SQL Maps documentatoin under Dynamic Mapped
Statements.)
that's a bigger change in coding than I wa
Benedict, Paul C wrote:
Sean,
Have you thought about constructing a DAO/Adapater object that receives your
input, and then does the notorious SQL-string building on the inside? If you
cannot get the elegant solution, you should at least make it appear elegant
by wrapping it inside of the DAO layer
Look into using iBATIS http://www.ibatis.com. It's easy to use and will
handle this kind of dynamic SQL very nicel (the PDF instruction manual
is nice. Look at the SQL Maps documentatoin under Dynamic Mapped
Statements.)
Sean Burlington wrote the following on 5/9/2005 10:37 AM:
H
Sean,
Have you thought about constructing a DAO/Adapater object that receives your
input, and then does the notorious SQL-string building on the inside? If you
cannot get the elegant solution, you should at least make it appear elegant
by wrapping it inside of the DAO layer.
-Original
of several text inputs and several checkboxes.
Only one text box should ever be filled in.
I can work out the resultant sql query by using lots of if statements as
below but it just doesn't seem very elegant ...
I could also break the search down into several forms and so different
actions -
Assuming that month, val1 & val2 are the *names* of columns this is going to
be a tricky problem to solve with just SQL. You need to query the system
tables to extract the names of the columns.
The other problem is that the number of columns in your result set needs to
vary depending on
1 - 100 of 151 matches
Mail list logo