New topic: New With postgresql i have a error
<http://forums.realsoftware.com/viewtopic.php?t=47872> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message jetpr Post subject: New With postgresql i have a errorPosted: Tue May 14, 2013 12:52 am Joined: Wed Sep 20, 2006 5:12 pm Posts: 655 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 Thom McGrath Post subject: Re: New With postgresql i have a errorPosted: Tue May 14, 2013 2:49 am Site Admin Joined: Tue May 06, 2008 1:07 pm Posts: 1449 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 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
