The Artima Developer Community
Sponsored Link

Java Answers Forum
This code won't work, I can't find my error, can anyone help???

1 reply on 1 page. Most recent reply: Jan 5, 2004 5:10 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Delie

Posts: 12
Nickname: tuti
Registered: Oct, 2003

This code won't work, I can't find my error, can anyone help??? Posted: Jan 5, 2004 10:25 AM
Reply to this message Reply
Advertisement
Ok, here is the query i made, but i don't know if it works. The connection to the db exists, but it won't execute. To make it clearer it doesn't reach the line "qdsUser.executeQuery();".

I hope i am clearer know,

thank you!

//check validation of username and password in db

QueryDataSet qdsUser= new QueryDataSet();
qdsUser.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(databaseOne,
"SELECT USERNAME from USER WHERE USER.\"USERNAME\"=" +username+
"AND USER.\"PASSWORD\"=" +password+" ", null, true,Load.ALL));

qdsUser.executeQuery();


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: This code won't work, I can't find my error, can anyone help??? Posted: Jan 5, 2004 5:10 PM
Reply to this message Reply
If you put the whole query in a string and look at it (or log it -- although, you should probaly be careful about the password part appearing the a log), you will notice that you don't have a space between the username and the "AND ..." and you do have an extraneous space at the end of the query.

I don't know if this is the cause of the problem you're having based one the meager clues you've provided, though...

Flat View: This topic has 1 reply on 1 page
Topic: Problem with read and write Collection Previous Topic   Next Topic Topic: Help with basic Applet

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use