no mistake but i didnt get what i want (with python module pymssql send information to the mssql)

gdyren at gmail.com gdyren at gmail.com
Fri Oct 17 07:30:50 EDT 2008


On 10月17日, 下午6时41分, Peter Otten <__pete... at web.de> wrote:
> gdy... at gmail.com wrote:
> > the code is below:
> > import pymssql
> > conn = pymssql.connect(host = "121.198.126.233",user = "xxxx",password
> > = "xxxx",database = "test")
> > print "connecting success"
> > cursor = conn.cursor()
> > cursor.execute("insert into bbs_test values(%s,%s,%s,%s,%s)",
> > ("1","nju","9:13","ustc","test"))
> > cursor.close()
> > conn.close()
> > in the idle:
> > connecting success
>
> > then i get into the database :test and find that there is nothing in
> > the table bbs_test.
> > i don't  know why
>
> Because you did not commit your changes with conn.commit().
>
> Peter- 隐藏被引用文字 -
>
> - 显示引用的文字 -

thank you . I know how .



More information about the Python-list mailing list