Beginner question!

SMALLp pofuk at email.t-com.hr
Fri Dec 21 10:11:11 EST 2007


Hy! I have error something like this

TypeError: unbound method insert() must be called with insertData 
instance as first argument (got str instance instead)

CODE:

File1.py
sql.insertData.insert("files", data)

sql.py

class insertData:
	def insert(self, dataTable, data):
		conn = self.openConnection.openConnection()		
		cursor = conn.cursor()
		sql ="INSERT INTO "+dataTable+" (user_name, file_name, file_size, 
file_path_local, file_path_FTP, curent_location, FTP_valid_time, 
uploaded, last_modified, last_verified, file_type, file_category) VLAUES 
"+data
		cursor.execute(sql)
		conn.Close()


Help and advice neaded!



More information about the Python-list mailing list