Beispiel #1
0
def getLastJobRecord():
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.SelectLastJobRecord()
    c.execute(SQL)
    value = c.fetchone()[0]
    end_connection(conn)
    return value
Beispiel #2
0
def startJob(newRecord):
    conn = make_connection()
    c = conn.cursor()
    SQL = Q.InsertIntoJobRecord(newRecord)
    c.execute(SQL)
    conn.commit()
    SQL = Q.SelectLastJobRecord()
    c.execute(SQL)
    JobIndex = c.fetchone()[0]
    SQL = Q.InsertInitnialActivity(newRecord, JobIndex)
    c.execute(SQL)
    conn.commit()
    end_connection(conn)