views:

13

answers:

1

I have some processes with python gui application and i want to connect with them to sql server.

i use the following modules

form multiproccessing import pool
import pymssql 

conn = pymssql.connect(host=host,user=user,password=password,database=database)

for data in my_list : 
   self.pool.apply_async(fun,data,conn)

i it possible to use the same connection on all the processes or i need to open a new connection to the sql server with every processs.

+2  A: 

A new one for every process, because per definition processes can not share in memory ressources.

TomTom