Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Nov 19, 2017 1:40 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: New With postgresql i have a error
PostPosted: Tue May 14, 2013 12:52 am 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
This is my Code

Dim Rs As RecordSet
Dim Out1 As String

SqlStr="Select * From UserInfo Where UserID='" + TxtId.Text + "' And Pass='" + TxtPass.Text + "'"

Out1=SqlStr

Rs=DbConn.SQLSelect(SqlStr)
If DbConn.Error then
MsgBox " Error " + DbConn.ErrorMessage
Out1=DbConn.ErrorMessage
Return False
End If

if Rs.RecordCount > 0 then
vSalePersonID=Rs.Field("UserID").StringValue
vSalePersonName=Rs.Field("Name").StringValue
'MainFrm.TxtCajero.Text=TxtId.Text
Return True
else
Return False
end if

Rs.Close
Rs=Nil

---------------My Problem ----------------------------------
ERROR: relation "userinfo" does not exist
LINE 1: Select * From UserInfo Where UserID='0001' And Pass='123'
^

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
 Post subject: Re: New With postgresql i have a error
PostPosted: Tue May 14, 2013 2:49 am 
Offline
Site Admin
User avatar

Joined: Tue May 06, 2008 1:07 pm
Posts: 1464
Location: NotEvenOnTheMap, CT
It means your table does not exist.

But first STOP what you're doing and secure your database code. The code you have here is vulnerable to SQL injection attacks. Even if you are not concerned with attacks, names containing apostrophes will cause database errors.

You can solve these problems by using the PostgreSQLPreparedStatement class.

You should probably do some sort of password hashing, and be sure to do your username lookups in lowercase, to avoid username case-sensitivity issues.

_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.


Top
 Profile  
Reply with quote  
 Post subject: Re: New With postgresql i have a error
PostPosted: Tue May 14, 2013 8:45 am 
Offline
User avatar

Joined: Wed Sep 20, 2006 5:12 pm
Posts: 680
Location: Puerto Rico
ok

thanks

_________________
Thanks for any contribution and God blesses all (I start Using RS in 10/12/2010)
Mac Mini with Lion v10.7.5 and Real Studio 2012r1 Pro And Windows 7 RS2012r1 Personal and Linux RS2012r1 Personal Register user
my Hobbies R/C Turbines Jets Models


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group