Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8521831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:56:11+00:00 2026-06-11T06:56:11+00:00

I run the following code and after researching the web, I stumbled upon a

  • 0

I run the following code and after researching the web, I stumbled upon a way to Insert records into MySQL using Python. I executed following code

i = 0

for j in range(starting_index,ending_index):
    for i in range(0,len(s)):
            c.append(nnp_array_index_coloumn.count(i))
            add1 = add1 + c[i-1]
            add2 = add1 + c[i]
            var_string_1 = ', '.join('?' * len(nnp_array[add1:add2]))
            cursor.execute("INSERT INTO tblauto_tagged ( propernoun_SRNO,tagger,train ,propernoun,propernoun_ID)VALUES (%d, %s,%s, %s, %s)" % (j, str(iput),str(corpora), var_string_1,"AUX" ))
            for item in nnp_array_index_coloumn:
                    if item not in uniques:
                            uniques.append(item)
                            add1=0;add2=0

Following Error was Generated

Traceback (most recent call last):
File "C:/Users/vchauhan/Desktop/test_for_write.py", line 111, in <module>
cursor.execute("INSERT INTO tblauto_tagged ( propernoun_SRNO,tagger,train ,propernoun,propernoun_ID)VALUES (%d, %s,%s, %s, %s)" % (j, str(iput),str(corpora), var_string_1,"AUX" ))
Error: ('07001', '[07001] [MySQL][ODBC 5.1 Driver][mysqld-5.1.61-community]SQLBindParameter not used for all parameters (506) (SQLExecDirectW)')
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:56:13+00:00Added an answer on June 11, 2026 at 6:56 am

    You don’t never concatenate strings in .execute(). See the db api faq

    Use this:

    q = """
          INSERT INTO
            tblauto_tagged
            (
               propernoun_SRNO,
               tagger,
               train,
               propernoun,
               propernoun_ID
             ) VALUES (
               %d,
               %s,
               %s,
               %s,
               %s
              )
           """
    cursor.execute(q,(j,str(iput),str(corpora),var_string_1,"AUX"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I managed to run the following code to insert into my table on first
I try to run the following code: public void Init(Url rootUrl) { var web
I want to run some code after my form is resized. However, the following
When run following code after compiling on gcc,I get segmentation fault. #include <stdio.h> #include
I am new to python and I am trying to run following code: m=int(raw_input())
I'm trying to run the following code to swap filenames. I'm using Runtime.exec .
Following code, using python 2.6.6 and MySQLdb 1.2.2 causes Commands out of sync; you
When the run the following code, everything works fine until $i = 5. After
I am using following code to limit use of resources. Once in a while(after
I am trying to post comment on wall using following code after successful login.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.