×

Discussion Board

Results 1 to 3 of 3

Thread: SQL Help

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    25

    SQL Help

    Hi,

    Sorry i start thread for only this topic i could not see thread for similar issue elsewhere.

    Where can i find what SQL syntax allowed for pys60??

    Code:
    # this query works.. 
    print select_row('Select CustID,CustHist from ' + Category + ' where Name = \'Stefan\' ')
    
    # This Query Doesnt Work when x is Stefan
    print select_row('Select CustID,CustHist from ' + Category + ' where Name = ' + '\''+ x + '\'\'')
    
    heres the select row method
    # search and retrieve from a row
    def select_row(query):
      dbv.prepare(db, unicode(query))
      dbv.first_line()
      dbv.get_line()
      result = []
      for i in range(dbv.col_count()):
        result.append(dbv.col(i+1))
      return result
    How come query works when i use the word Stefan but when i put a var containing the string stefan it will not work

    Thank you for help with this

    EDIT: Error i get is [Errno -6]
    KErrArgument
    Last edited by ComplexT; 2008-03-09 at 18:22.

  2. #2
    Registered User
    Join Date
    Sep 2003
    Posts
    77

    Re: SQL Help

    The DBMS is documented in the Symbian OS Library. Although this documentation is aimed to C++ developing you might get an impression of the available SQL functionality.

    Online: http://www.symbian.com/developer/tec...de%2eSQL%2etoc
    It's also in the documentation files of the S60 SDK's (SDK Help).

    for your problem try:
    Code:
    query = 'Select CustID,CustHist from ' + Category + ' where Name = ' + str(x)

  3. #3
    Registered User
    Join Date
    Mar 2008
    Posts
    25

    Re: SQL Help

    Hi Guys,

    Thanks for you help but i am still struggling with basic sql syntax

    spring = db.execute(u'Select Name from ' + Category + ' where Name = \'' + term +'\' ')

    Any body know why this doesnt work?

    Could someone please supply some very simple statements that i can use with my method..

    def select_row(query):
    dbv.prepare(db, unicode(query))
    dbv.first_line()
    dbv.get_line()
    result = []
    for i in range(dbv.col_count()):
    result.append(dbv.col(i+1))
    return result

    Thank You!

Similar Threads

  1. Update SQL statement doesn't work
    By asheeshv in forum Symbian
    Replies: 4
    Last Post: 2008-12-11, 05:41
  2. Replies: 2
    Last Post: 2005-04-19, 06:16
  3. String to Integer conversion in Symbian SQL
    By sai_irfan in forum Symbian
    Replies: 1
    Last Post: 2004-09-08, 11:02
  4. DBMS - sql function Uppercase/Lowercase ?
    By aldrin_rave in forum Symbian
    Replies: 2
    Last Post: 2003-04-29, 09:37
  5. Test GPRS modem with Microsoft SQL Server 2000
    By chadahamat2704 in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2003-03-13, 07:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×