19 lines
419 B
Python
19 lines
419 B
Python
#!/usr/bin/env python
|
|
# coding=utf8
|
|
|
|
import sys
|
|
import dmPython
|
|
def insert():
|
|
conn=dmPython.connect(user='SYSDBA',password='123456',server= 'LOCALHOST',port=5236)
|
|
cursor = conn.cursor()
|
|
for i in range(10):
|
|
cursor.execute("insert into t01 values ('a'||%s, 'b'||%s)" %(i,i))
|
|
cursor.close()
|
|
conn.close()
|
|
return "success"
|
|
|
|
if __name__ == '__main__':
|
|
if sys.argv[1] == 'insert' :
|
|
result = insert()
|
|
print(result)
|