File: memtest.py

package info (click to toggle)
pymssql 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 972 kB
  • sloc: python: 3,801; sh: 152; makefile: 151; ansic: 1
file content (18 lines) | stat: -rwxr-xr-x 464 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- coding: utf-8 -*-
#!/usr/bin/python
"""

"""

from pymssql import _mssql

test_str = 'testing' * 1000

for i in xrange(0, 1000):
    cnx = _mssql.connect('ukplcdbtest01', 'sa', 'deter101', charset='cp1252')
    cnx.select_db('tempdb')
    proc = cnx.init_procedure('pymssqlTestVarchar')
    proc.bind(test_str, _mssql.SQLVARCHAR, '@ivarchar')
    proc.bind(None, _mssql.SQLVARCHAR, '@ovarchar', output=True)
    return_value = proc.execute()
    cnx.close()