Python Forum
Python Error- TypeError: ('Params must be in a list, tuple, or Row', 'HY000')
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Error- TypeError: ('Params must be in a list, tuple, or Row', 'HY000')
#1
I have a python error TypeError: ('Params must be in a list, tuple, or Row', 'HY000') but I don't know how to fix any suggestions my code is below:

if len(strSsn.strip()) > 0:
   s20tuple = ("MICROS",strStoreId,strInDate,strOutDate,strInTime,strOutTime,
               formatSsn(strSsn),intPayRate,intTips,intReghours,intOthours,strPositionde,
               intEmpAdj)
   s20tuple = tuple(s20tuple)


   server = '*******' 
   database = '******' 
   username = '************' 
   password = '************' 
            
   with pyodbc.connect('DRIVER={SQL Server Native Client 10.0};SERVER='+server+';DATABASE='+database+';UID='+username+';PWD='+ password) as myDbConn:
        with myDbConn.cursor() as cursor:
             cursor.executemany("""INSERT INTO s20data(clockdata,storeid,indate,outdate,indatetime,outdatetim,
                                 ssn,payrate,tips,reghours,othours,positionde,empadj) VALUES {?,?,?,?,?,?,?,?,?,?,?,?,?""",s20tuple)
             myDbConn.commit()

      
Reply


Messages In This Thread
Python Error- TypeError: ('Params must be in a list, tuple, or Row', 'HY000') - by DarkCoder2020 - Jul-28-2020, 03:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in the method "count" for tuple fff 2 794 Nov-24-2024, 03:29 AM
Last Post: fff
  using > < for tuple , list,... akbarza 3 1,687 Feb-05-2024, 01:18 PM
Last Post: deanhystad
  error in class: TypeError: 'str' object is not callable akbarza 2 1,694 Dec-30-2023, 04:35 PM
Last Post: deanhystad
Question mypy unable to analyse types of tuple elements in a list comprehension tomciodev 1 1,594 Oct-17-2023, 09:46 AM
Last Post: tomciodev
  Change font in a list or tuple apffal 4 3,704 Jun-16-2023, 02:55 AM
Last Post: schriftartenio
  boto3 - Error - TypeError: string indices must be integers kpatil 7 3,086 Jun-09-2023, 06:56 PM
Last Post: kpatil
  Error TypeError: output_type_handler() takes 2 positional arguments but 6 were given paulo79 1 3,433 Oct-17-2022, 06:29 PM
Last Post: paulo79
  search a list or tuple for a specific type ot class Skaperen 8 3,516 Jul-22-2022, 10:29 PM
Last Post: Skaperen
  TypeError: float() argument must be a string or a number, not 'list' Anldra12 2 6,674 Jul-01-2022, 01:23 PM
Last Post: deanhystad
  TypeError: unsupported opperand type(s) for %: 'int' and 'list' cool_person 7 3,559 May-07-2022, 08:40 AM
Last Post: ibreeden

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020