| 1 |
ninoborges |
8 |
>>> Generating to C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py
|
| 2 |
|
|
Building definitions from type library...
|
| 3 |
|
|
Generating...
|
| 4 |
|
|
Importing module
|
| 5 |
|
|
>>> import win32com.client
|
| 6 |
|
|
>>> daoEngine = win32com.client.Dispatch('DAO.EBEngine')
|
| 7 |
|
|
Traceback (most recent call last):
|
| 8 |
|
|
File "<interactive input>", line 1, in <module>
|
| 9 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
|
| 10 |
|
|
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
|
| 11 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName
|
| 12 |
|
|
return (_GetGoodDispatch(IDispatch, clsctx), userName)
|
| 13 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 78, in _GetGoodDispatch
|
| 14 |
|
|
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
|
| 15 |
|
|
com_error: (-2147221005, 'Invalid class string', None, None)
|
| 16 |
|
|
>>> daoEngine = win32com.client.Dispatch('DAO.DBEngine')
|
| 17 |
|
|
Traceback (most recent call last):
|
| 18 |
|
|
File "<interactive input>", line 1, in <module>
|
| 19 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
|
| 20 |
|
|
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
|
| 21 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName
|
| 22 |
|
|
return (_GetGoodDispatch(IDispatch, clsctx), userName)
|
| 23 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 78, in _GetGoodDispatch
|
| 24 |
|
|
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
|
| 25 |
|
|
com_error: (-2147221005, 'Invalid class string', None, None)
|
| 26 |
|
|
>>> daoEngine = win32com.client.Dispatch('_DAO')
|
| 27 |
|
|
Traceback (most recent call last):
|
| 28 |
|
|
File "<interactive input>", line 1, in <module>
|
| 29 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
|
| 30 |
|
|
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
|
| 31 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName
|
| 32 |
|
|
return (_GetGoodDispatch(IDispatch, clsctx), userName)
|
| 33 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 78, in _GetGoodDispatch
|
| 34 |
|
|
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
|
| 35 |
|
|
com_error: (-2147221005, 'Invalid class string', None, None)
|
| 36 |
|
|
>>> daoEngine = win32com.client.Dispatch('_DAO.DBEngine')
|
| 37 |
|
|
Traceback (most recent call last):
|
| 38 |
|
|
File "<interactive input>", line 1, in <module>
|
| 39 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
|
| 40 |
|
|
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
|
| 41 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName
|
| 42 |
|
|
return (_GetGoodDispatch(IDispatch, clsctx), userName)
|
| 43 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 78, in _GetGoodDispatch
|
| 44 |
|
|
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
|
| 45 |
|
|
com_error: (-2147221005, 'Invalid class string', None, None)
|
| 46 |
|
|
>>> daoEngine = win32com.client.Dispatch('_DBEngine')
|
| 47 |
|
|
Traceback (most recent call last):
|
| 48 |
|
|
File "<interactive input>", line 1, in <module>
|
| 49 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
|
| 50 |
|
|
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
|
| 51 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName
|
| 52 |
|
|
return (_GetGoodDispatch(IDispatch, clsctx), userName)
|
| 53 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 78, in _GetGoodDispatch
|
| 54 |
|
|
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
|
| 55 |
|
|
com_error: (-2147221005, 'Invalid class string', None, None)
|
| 56 |
|
|
>>> daoEngine = win32com.client.Dispatch('_DBEngine')
|
| 57 |
|
|
Traceback (most recent call last):
|
| 58 |
|
|
File "<interactive input>", line 1, in <module>
|
| 59 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
|
| 60 |
|
|
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
|
| 61 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName
|
| 62 |
|
|
return (_GetGoodDispatch(IDispatch, clsctx), userName)
|
| 63 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\dynamic.py", line 78, in _GetGoodDispatch
|
| 64 |
|
|
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
|
| 65 |
|
|
com_error: (-2147221005, 'Invalid class string', None, None)
|
| 66 |
|
|
>>> daoEngine = win32com.client.Dispatch('DAO.DBEngine.36')
|
| 67 |
|
|
>>> daoDB = daoEngine.OpenDatabase(r"\\Chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
|
| 68 |
|
|
>>> daoRS = daoDB.OpenRecordset('SELECT TMP, CLIENTMATTERNUM,EMPID FROM tbl_MatterTrackingData')
|
| 69 |
|
|
Traceback (most recent call last):
|
| 70 |
|
|
File "<interactive input>", line 1, in <module>
|
| 71 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 72 |
|
|
, Type, Options, LockEdit)
|
| 73 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', 'Too few parameters. Expected 1.', 'jeterr40.chm', 5003061, -2146825227), None)
|
| 74 |
|
|
>>> daoRS = daoDB.OpenRecordset('SELECT TPM FROM tbl_MatterTrackingData')
|
| 75 |
|
|
>>> daoRS.MoveLast()
|
| 76 |
|
|
>>> daoRS.RecordCount
|
| 77 |
|
|
166
|
| 78 |
|
|
>>> daoRS = daoDB.OpenRecordset('SELECT TPM, Case Name,EmpID WHERE EmpID=09756 FROM tbl_MatterTrackingData')
|
| 79 |
|
|
Traceback (most recent call last):
|
| 80 |
|
|
File "<interactive input>", line 1, in <module>
|
| 81 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 82 |
|
|
, Type, Options, LockEdit)
|
| 83 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', "Syntax error (missing operator) in query expression 'Case Name WHERE EmpID=09756'.", 'jeterr40.chm', 5003075, -2146825213), None)
|
| 84 |
|
|
>>> daoRS = daoDB.OpenRecordset('SELECT TPM, Case Name,EmpID WHERE EmpID=09756 FROM tbl_MatterTrackingData')
|
| 85 |
|
|
Traceback (most recent call last):
|
| 86 |
|
|
File "<interactive input>", line 1, in <module>
|
| 87 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 88 |
|
|
, Type, Options, LockEdit)
|
| 89 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', "Syntax error (missing operator) in query expression 'Case Name'.", 'jeterr40.chm', 5003075, -2146825213), None)
|
| 90 |
|
|
>>> daoRS = daoDB.OpenRecordset('SELECT TPM, Case Name,EmpID FROM tbl_MatterTrackingData WHERE EmpID=09756')
|
| 91 |
|
|
Traceback (most recent call last):
|
| 92 |
|
|
File "<interactive input>", line 1, in <module>
|
| 93 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 94 |
|
|
, Type, Options, LockEdit)
|
| 95 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', "Syntax error (missing operator) in query expression 'Case Name'.", 'jeterr40.chm', 5003075, -2146825213), None)
|
| 96 |
|
|
>>> daoRS = daoDB.OpenRecordset('SELECT TPM, Case Name,EmpID FROM tbl_MatterTrackingData WHERE EmpID="09756"')
|
| 97 |
|
|
Traceback (most recent call last):
|
| 98 |
|
|
File "<interactive input>", line 1, in <module>
|
| 99 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 100 |
|
|
, Type, Options, LockEdit)
|
| 101 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', "Syntax error (missing operator) in query expression 'Case Name'.", 'jeterr40.chm', 5003075, -2146825213), None)
|
| 102 |
|
|
>>> daoRS = daoDB.OpenRecordset("SELECT TPM,EmpID FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 103 |
|
|
Traceback (most recent call last):
|
| 104 |
|
|
File "<interactive input>", line 1, in <module>
|
| 105 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 106 |
|
|
, Type, Options, LockEdit)
|
| 107 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', "Syntax error (missing operator) in query expression 'Case Name'.", 'jeterr40.chm', 5003075, -2146825213), None)
|
| 108 |
|
|
>>> daoRS = daoDB.OpenRecordset("SELECT TPM,EmpID FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 109 |
|
|
>>> for i in range(daoRS.RecordCount):
|
| 110 |
|
|
...
|
| 111 |
|
|
>>> daoRS.MoveLast()
|
| 112 |
|
|
>>> daoRS.Fields('TPM').Value
|
| 113 |
|
|
u'Borges, Emanuel'
|
| 114 |
|
|
>>> daoRS = daoDB.OpenRecordset("SELECT TPM,CaseName,EmpID FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 115 |
|
|
Traceback (most recent call last):
|
| 116 |
|
|
File "<interactive input>", line 1, in <module>
|
| 117 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 118 |
|
|
, Type, Options, LockEdit)
|
| 119 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', "Syntax error (missing operator) in query expression 'Case Name'.", 'jeterr40.chm', 5003075, -2146825213), None)
|
| 120 |
|
|
>>> daoRS = daoDB.OpenRecordset("SELECT TPM,CaseName,EmpID FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 121 |
|
|
Traceback (most recent call last):
|
| 122 |
|
|
File "<interactive input>", line 1, in <module>
|
| 123 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 124 |
|
|
, Type, Options, LockEdit)
|
| 125 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', 'Too few parameters. Expected 1.', 'jeterr40.chm', 5003061, -2146825227), None)
|
| 126 |
|
|
>>> daoRS = daoDB.OpenRecordset("SELECT TPM,Case_Name,EmpID FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 127 |
|
|
Traceback (most recent call last):
|
| 128 |
|
|
File "<interactive input>", line 1, in <module>
|
| 129 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 523, in OpenRecordset
|
| 130 |
|
|
, Type, Options, LockEdit)
|
| 131 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Database', 'Too few parameters. Expected 1.', 'jeterr40.chm', 5003061, -2146825227), None)
|
| 132 |
|
|
>>> daoRS = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 133 |
|
|
>>> daoRS.Fields('ClientMatterNumb').Value
|
| 134 |
|
|
Traceback (most recent call last):
|
| 135 |
|
|
File "<interactive input>", line 1, in <module>
|
| 136 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 848, in __call__
|
| 137 |
|
|
ret = self._oleobj_.InvokeTypes(0, LCID, 2, (13, 0), ((12, 1),),Item
|
| 138 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Fields', 'Item not found in this collection.', 'jeterr40.chm', 5003265, -2146825023), None)
|
| 139 |
|
|
>>> daoRS.Fields('ClientMatterNum').Value
|
| 140 |
|
|
u'071082.0022'
|
| 141 |
|
|
>>> daoRS.RecordCount
|
| 142 |
|
|
1
|
| 143 |
|
|
>>> daoRS.MoveLast()
|
| 144 |
|
|
>>> fullCount = dao.RecordCount
|
| 145 |
|
|
Traceback (most recent call last):
|
| 146 |
|
|
File "<interactive input>", line 1, in <module>
|
| 147 |
|
|
NameError: name 'dao' is not defined
|
| 148 |
|
|
>>> fullCount = daoRS.RecordCount
|
| 149 |
|
|
>>> fullCount
|
| 150 |
|
|
6
|
| 151 |
|
|
>>> daoRS.MoveFirst()
|
| 152 |
|
|
>>> for i in range(fullCount):
|
| 153 |
|
|
... print daoRS.Fields('ClientMatterNum').Value
|
| 154 |
|
|
... daoRS.MoveNext()
|
| 155 |
|
|
...
|
| 156 |
|
|
Traceback (most recent call last):
|
| 157 |
|
|
File "<interactive input>", line 1, in <module>
|
| 158 |
|
|
NameError: name 'fullcount' is not defined
|
| 159 |
|
|
>>> for i in range(fullCount):
|
| 160 |
|
|
... print daoRS.Fields('ClientMatterNum').Value
|
| 161 |
|
|
... daoRS.MoveNext()
|
| 162 |
|
|
...
|
| 163 |
|
|
071082.0022
|
| 164 |
|
|
072810.0028
|
| 165 |
|
|
080616.0015
|
| 166 |
|
|
083614.0013
|
| 167 |
|
|
084597.0011
|
| 168 |
|
|
086400.0016
|
| 169 |
|
|
>>> daoRS.MoveFirst()
|
| 170 |
|
|
>>> for i in range(fullCount):
|
| 171 |
|
|
... print daoRS.Fields('ClientMatterNum').Value
|
| 172 |
|
|
>>> for i in range(fullCount):
|
| 173 |
|
|
... print daoRS.Fields('CaseName').Value
|
| 174 |
|
|
... daoRS.MoveNext()
|
| 175 |
|
|
...
|
| 176 |
|
|
Traceback (most recent call last):
|
| 177 |
|
|
File "<interactive input>", line 2, in <module>
|
| 178 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 848, in __call__
|
| 179 |
|
|
ret = self._oleobj_.InvokeTypes(0, LCID, 2, (13, 0), ((12, 1),),Item
|
| 180 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Fields', 'Item not found in this collection.', 'jeterr40.chm', 5003265, -2146825023), None)
|
| 181 |
|
|
>>> for i in range(fullCount):
|
| 182 |
|
|
... print daoRS.Fields('Case Name').Value
|
| 183 |
|
|
... daoRS.MoveNext()
|
| 184 |
|
|
...
|
| 185 |
|
|
Citadel Energy
|
| 186 |
|
|
Inverness Medical
|
| 187 |
|
|
Englehorn
|
| 188 |
|
|
Idnani
|
| 189 |
|
|
EAPD
|
| 190 |
|
|
MKS
|
| 191 |
|
|
>>> for i in range(fullCount):
|
| 192 |
|
|
... print daoRS.Fields('Case Name').Value
|
| 193 |
|
|
... daoRS.MoveNext()
|
| 194 |
|
|
...
|
| 195 |
|
|
Traceback (most recent call last):
|
| 196 |
|
|
File "<interactive input>", line 2, in <module>
|
| 197 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 496, in __getattr__
|
| 198 |
|
|
if d is not None: return getattr(d, attr)
|
| 199 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 455, in __getattr__
|
| 200 |
|
|
return self._ApplyTypes_(*args)
|
| 201 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 448, in _ApplyTypes_
|
| 202 |
|
|
dispid, 0, wFlags, retType, argTypes, *args),
|
| 203 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Field', 'No current record.', 'jeterr40.chm', 5003021, -2146825267), None)
|
| 204 |
|
|
>>> daoRS.MoveFirst()
|
| 205 |
|
|
>>> for i in range(fullCount):
|
| 206 |
|
|
... print"%s : %s"%(daoRS.Fields('ClientMatterNum').Value, daoRS.Fields('Case Name').Value)
|
| 207 |
|
|
... daoRS.MoveNext()
|
| 208 |
|
|
...
|
| 209 |
|
|
071082.0022 : Citadel Energy
|
| 210 |
|
|
072810.0028 : Inverness Medical
|
| 211 |
|
|
080616.0015 : Englehorn
|
| 212 |
|
|
083614.0013 : Idnani
|
| 213 |
|
|
084597.0011 : EAPD
|
| 214 |
|
|
086400.0016 : MKS
|
| 215 |
|
|
>>> daoRS = ""
|
| 216 |
|
|
>>> daoEngine = ""
|
| 217 |
|
|
>>> daoEngine = win32com.client.Dispatch('DAO.DBEngine.36')
|
| 218 |
|
|
>>> daoDB = daoEngine.OpenDatabase(r"\\Chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
|
| 219 |
|
|
Traceback (most recent call last):
|
| 220 |
|
|
File "<interactive input>", line 1, in <module>
|
| 221 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 2109, in OpenDatabase
|
| 222 |
|
|
, Options, ReadOnly, Connect)
|
| 223 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Workspace', 'Disk or network error.', 'jeterr40.chm', 5003043, -2146825245), None)
|
| 224 |
|
|
>>> daoDB = daoEngine.OpenDatabase(r"\\Chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
|
| 225 |
|
|
Traceback (most recent call last):
|
| 226 |
|
|
File "<interactive input>", line 1, in <module>
|
| 227 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 2109, in OpenDatabase
|
| 228 |
|
|
, Options, ReadOnly, Connect)
|
| 229 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Workspace', 'Disk or network error.', 'jeterr40.chm', 5003043, -2146825245), None)
|
| 230 |
|
|
>>> daoDB = daoEngine.OpenDatabase(r"\\Chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
|
| 231 |
|
|
Traceback (most recent call last):
|
| 232 |
|
|
File "<interactive input>", line 1, in <module>
|
| 233 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 2109, in OpenDatabase
|
| 234 |
|
|
, Options, ReadOnly, Connect)
|
| 235 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Workspace', 'Disk or network error.', 'jeterr40.chm', 5003043, -2146825245), None)
|
| 236 |
|
|
>>> daoDB = daoEngine.OpenDatabase(r"\\Chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
|
| 237 |
|
|
Traceback (most recent call last):
|
| 238 |
|
|
File "<interactive input>", line 1, in <module>
|
| 239 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 2109, in OpenDatabase
|
| 240 |
|
|
, Options, ReadOnly, Connect)
|
| 241 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Workspace', 'Disk or network error.', 'jeterr40.chm', 5003043, -2146825245), None)
|
| 242 |
|
|
>>> daoEngine = win32com.client.Dispatch('DAO.DBEngine.36')
|
| 243 |
|
|
>>> daoDB = daoEngine.OpenDatabase(r"\\Chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
|
| 244 |
|
|
Traceback (most recent call last):
|
| 245 |
|
|
File "<interactive input>", line 1, in <module>
|
| 246 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 2109, in OpenDatabase
|
| 247 |
|
|
, Options, ReadOnly, Connect)
|
| 248 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Workspace', 'Disk or network error.', 'jeterr40.chm', 5003043, -2146825245), None)
|
| 249 |
|
|
>>>
|
| 250 |
|
|
|
| 251 |
|
|
|
| 252 |
|
|
day 2
|
| 253 |
|
|
|
| 254 |
|
|
>>> import win32com.client
|
| 255 |
|
|
>>> daoEngine = win32com.client.Dispatch('DAO.DBEngine.36')
|
| 256 |
|
|
>>> daoDB = daoEngine.OpenDatabase(r"\\Chiads01\app\DS_CaseTrack\TPM_CaseTracking.mdb")
|
| 257 |
|
|
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData)
|
| 258 |
|
|
Traceback ( File "<interactive input>", line 1
|
| 259 |
|
|
daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData)
|
| 260 |
|
|
^
|
| 261 |
|
|
SyntaxError: EOL while scanning single-quoted string
|
| 262 |
|
|
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData')
|
| 263 |
|
|
>>> daoRS2.AddNew()
|
| 264 |
|
|
>>> daoRS2.Fields('ClientMatterNum').Value = '08497.0011'
|
| 265 |
|
|
>>> daoRS2.Fields('Case Name').Value = 'Aziz Zapsu'
|
| 266 |
|
|
>>> import MPC_Lib
|
| 267 |
|
|
Traceback (most recent call last):
|
| 268 |
|
|
File "<interactive input>", line 1, in <module>
|
| 269 |
|
|
ImportError: No module named MPC_Lib
|
| 270 |
|
|
>>> import MCP_Lib
|
| 271 |
|
|
>>> tpmName,tpmID = MCP_Lib.GetTPMInfo()
|
| 272 |
|
|
Traceback (most recent call last):
|
| 273 |
|
|
File "<interactive input>", line 1, in <module>
|
| 274 |
|
|
File "C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py", line 33, in GetTPMInfo
|
| 275 |
|
|
caseDir,tPMName, tPMID = open(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),"settings.sys")).readlines()
|
| 276 |
|
|
IOError: [Errno 2] No such file or directory: 'C:\\settings.sys'
|
| 277 |
|
|
>>> import sys
|
| 278 |
|
|
>>> sys.path[0] = r"C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP"
|
| 279 |
|
|
>>> tpmName,tpmID = MCP_Lib.GetTPMInfo()
|
| 280 |
|
|
Traceback (most recent call last):
|
| 281 |
|
|
File "<interactive input>", line 1, in <module>
|
| 282 |
|
|
File "C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py", line 33, in GetTPMInfo
|
| 283 |
|
|
caseDir,tPMName, tPMID = open(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),"settings.sys")).readlines()
|
| 284 |
|
|
IOError: [Errno 2] No such file or directory: 'C:\\settings.sys'
|
| 285 |
|
|
>>> daoRS2.Fields('EmpID').Value = '09756'
|
| 286 |
|
|
>>> daoRS2.Fields('TPM').Value = 'Borges, Emanuel'
|
| 287 |
|
|
>>> daoRS2.Update()
|
| 288 |
|
|
>>> daoRS2.Close()
|
| 289 |
|
|
>>> daoRS1 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData')
|
| 290 |
|
|
>>> daoRS1.MoveLast()
|
| 291 |
|
|
>>> fullCount = daoRS1.RecordCount
|
| 292 |
|
|
>>> daoRS1.MoveFirst()
|
| 293 |
|
|
>>> accessDBCLMList = []
|
| 294 |
|
|
>>> for i in range(fullCount):
|
| 295 |
|
|
... accessDBCLMList.append(daoRS1.Fields('ClientMatterNum').Value)
|
| 296 |
|
|
... daoRS1.MoveNext()
|
| 297 |
|
|
...
|
| 298 |
|
|
>>> len(accessDBCLMList)
|
| 299 |
|
|
167
|
| 300 |
|
|
>>> daoRS1 = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 301 |
|
|
>>> daoRS1.MoveLast()
|
| 302 |
|
|
>>> fullCount = daoRS1.RecordCount
|
| 303 |
|
|
>>> daoRS1.MoveFirst()
|
| 304 |
|
|
>>> accessDBCLMList = []
|
| 305 |
|
|
>>> for i in range(fullCount):
|
| 306 |
|
|
... accessDBCLMList.append(daoRS1.Fields('ClientMatterNum').Value)
|
| 307 |
|
|
... daoRS1.MoveNext()
|
| 308 |
|
|
...
|
| 309 |
|
|
>>> len(accessDBCLMList)
|
| 310 |
|
|
7
|
| 311 |
|
|
>>> daoRS1.Close()
|
| 312 |
|
|
>>> reload(MCP_Lib)
|
| 313 |
|
|
<module 'MCP_Lib' from 'C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py'>
|
| 314 |
|
|
>>> tpmName,tpmID = MCP_Lib.GetTPMInfo()
|
| 315 |
|
|
Traceback (most recent call last):
|
| 316 |
|
|
File "<interactive input>", line 1, in <module>
|
| 317 |
|
|
File "C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py", line 39, in GetTPMInfo
|
| 318 |
|
|
casesDir = open(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])),"settings.sys")).readline().replace("\n","")
|
| 319 |
|
|
IOError: [Errno 2] No such file or directory: 'C:\\settings.sys'
|
| 320 |
|
|
>>> tpmName,tpmID = MCP_Lib.GetTPMInfo(r"C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP")
|
| 321 |
|
|
Traceback (most recent call last):
|
| 322 |
|
|
File "<interactive input>", line 1, in <module>
|
| 323 |
|
|
File "C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py", line 42, in GetTPMInfo
|
| 324 |
|
|
tPMName = tPMName.replace("\n","")
|
| 325 |
|
|
UnboundLocalError: local variable 'tPMName' referenced before assignment
|
| 326 |
|
|
>>> reload(MCP_Lib)
|
| 327 |
|
|
<module 'MCP_Lib' from 'C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py'>
|
| 328 |
|
|
>>> tpmName,tpmID = MCP_Lib.GetTPMInfo(r"C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP")
|
| 329 |
|
|
>>> tpmName
|
| 330 |
|
|
'Borges, Emanuel'
|
| 331 |
|
|
>>> tpmID
|
| 332 |
|
|
'09756'
|
| 333 |
|
|
>>> responsibleCases, Casedir = MCP_Lib.GetCaseList(r"C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP")
|
| 334 |
|
|
Traceback (most recent call last):
|
| 335 |
|
|
File "<interactive input>", line 1, in <module>
|
| 336 |
|
|
File "C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py", line 24, in GetCaseList
|
| 337 |
|
|
for file in os.listdir(casesDir):
|
| 338 |
|
|
TypeError: coercing to Unicode: need string or buffer, file found
|
| 339 |
|
|
>>> responsibleCases, casesDir = MCP_Lib.GetCaseList(r"C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP")
|
| 340 |
|
|
Traceback (most recent call last):
|
| 341 |
|
|
File "<interactive input>", line 1, in <module>
|
| 342 |
|
|
File "C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py", line 24, in GetCaseList
|
| 343 |
|
|
for file in os.listdir(casesDir):
|
| 344 |
|
|
TypeError: coercing to Unicode: need string or buffer, file found
|
| 345 |
|
|
>>> reload(MCP_Lib)
|
| 346 |
|
|
<module 'MCP_Lib' from 'C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP\MCP_Lib.py'>
|
| 347 |
|
|
>>> responsibleCases, casesDir = MCP_Lib.GetCaseList(r"C:\Documents and Settings\eborges\My Documents\My Dropbox\Dev\Python\NinoCode\Active_prgs\Concordance\MCP")
|
| 348 |
|
|
>>> responsibleCases
|
| 349 |
|
|
['Aziz Zapsu_(084974-0011)', 'Bain-Hersheys_(054168-0120)', 'Bain-Mars_(054168-0119)', 'Citadel_(071082-0022)', 'Coalco_(083980-0011)', 'Concentra_(049700-0063)', 'DaVita-Dallas_(039323-0308)', 'DaVita-GA_(039323-0292)', 'EAPD_(084597-0011)', 'Engelhorn_(080616-0015)', 'Idnani_(083614-0013)', 'Inverness_(072810-0028)', 'Littleton Electric_(073987-0010)', 'MKS_(086400-0016)', 'Nixon Peabody_(082506-0013)', 'Nomir_(024032-0376)', 'Osram_Sylvania_(088269-0011)', 'Porton Capital_(083128-0011)', 'PrimaCare_(057157-0010)', 'Sallop_(024032-0376)', 'Seacoast_(076834-0012)', 'Sovereign Intervenor Group_(087097-0011)', 'StateStreet_(030790-0247)', 'Tria_(082185-0012)', 'Winn_Companies_(085871-0011)', 'Yeadon_(076326-0024)']
|
| 350 |
|
|
>>> for case in responsibleCases:
|
| 351 |
|
|
... caseName, clmn = case.split("_(")
|
| 352 |
|
|
... clmn = clmn.replace(")","")
|
| 353 |
|
|
... clmn = clmn.replace("-",".")
|
| 354 |
|
|
... caseMatrix[clmn] = caseName
|
| 355 |
|
|
...
|
| 356 |
|
|
Traceback (most recent call last):
|
| 357 |
|
|
File "<interactive input>", line 5, in <module>
|
| 358 |
|
|
NameError: name 'caseMatrix' is not defined
|
| 359 |
|
|
>>> caseMatrix = {}
|
| 360 |
|
|
>>> for case in responsibleCases:
|
| 361 |
|
|
... caseName, clmn = case.split("_(")
|
| 362 |
|
|
... clmn = clmn.replace(")","")
|
| 363 |
|
|
... clmn = clmn.replace("-",".")
|
| 364 |
|
|
... caseMatrix[clmn] = caseName
|
| 365 |
|
|
...
|
| 366 |
|
|
>>> accessDBCLMList[0]
|
| 367 |
|
|
u'071082.0022'
|
| 368 |
|
|
>>> for i in caseMatrix.Keys():
|
| 369 |
|
|
... if i in accessDBCLMList:
|
| 370 |
|
|
... print "yes"
|
| 371 |
|
|
... else: print "Nope"
|
| 372 |
|
|
...
|
| 373 |
|
|
Traceback (most recent call last):
|
| 374 |
|
|
File "<interactive input>", line 1, in <module>
|
| 375 |
|
|
AttributeError: 'dict' object has no attribute 'Keys'
|
| 376 |
|
|
>>> caseMatrix.k
|
| 377 |
|
|
>>> for i in caseMatrix.keys():
|
| 378 |
|
|
... if i in accessDBCLMList:
|
| 379 |
|
|
... print "yes"
|
| 380 |
|
|
... else: print "Nope"
|
| 381 |
|
|
...
|
| 382 |
|
|
Nope
|
| 383 |
|
|
Nope
|
| 384 |
|
|
yes
|
| 385 |
|
|
Nope
|
| 386 |
|
|
Nope
|
| 387 |
|
|
Nope
|
| 388 |
|
|
Nope
|
| 389 |
|
|
Nope
|
| 390 |
|
|
yes
|
| 391 |
|
|
yes
|
| 392 |
|
|
Nope
|
| 393 |
|
|
Nope
|
| 394 |
|
|
Nope
|
| 395 |
|
|
yes
|
| 396 |
|
|
Nope
|
| 397 |
|
|
yes
|
| 398 |
|
|
Nope
|
| 399 |
|
|
Nope
|
| 400 |
|
|
yes
|
| 401 |
|
|
Nope
|
| 402 |
|
|
Nope
|
| 403 |
|
|
Nope
|
| 404 |
|
|
Nope
|
| 405 |
|
|
Nope
|
| 406 |
|
|
yes
|
| 407 |
|
|
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData')
|
| 408 |
|
|
>>> daoRS2.AddNew()
|
| 409 |
|
|
>>>
|
| 410 |
|
|
>>> daoRS2.Close()
|
| 411 |
|
|
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData')
|
| 412 |
|
|
>>> for i in caseMatrix.keys():
|
| 413 |
|
|
... if i in accessDBCLMList:
|
| 414 |
|
|
... print "yes"
|
| 415 |
|
|
... else:
|
| 416 |
|
|
... daoRS2.AddNew()
|
| 417 |
|
|
... daoRS2.Fields('ClientMatterNum').Value = i
|
| 418 |
|
|
... daoRS2.Fields('Case Name').Value = caseMatrix[
|
| 419 |
|
|
>>> caseMatrix['039323.0308']
|
| 420 |
|
|
'DaVita-Dallas'
|
| 421 |
|
|
>>> for i in caseMatrix.keys():
|
| 422 |
|
|
... if i in accessDBCLMList:
|
| 423 |
|
|
... print "yes"
|
| 424 |
|
|
... else:
|
| 425 |
|
|
... daoRS2.AddNew()
|
| 426 |
|
|
... daoRS2.Fields('ClientMatterNum').Value = i
|
| 427 |
|
|
... daoRS2.Fields('Case Name').Value = caseMatrix[i]
|
| 428 |
|
|
... daoRS2.Fields('EmpID').Value = tpmID
|
| 429 |
|
|
... daoRS2.Fields('TPM').Value = tpmName
|
| 430 |
|
|
... daoRS2.Update()
|
| 431 |
|
|
...
|
| 432 |
|
|
yes
|
| 433 |
|
|
Traceback (most recent call last):
|
| 434 |
|
|
File "<interactive input>", line 10, in <module>
|
| 435 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 1480, in Update
|
| 436 |
|
|
, Force)
|
| 437 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Recordset', 'The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.', 'jeterr40.chm', 5003022, -2146825266), None)
|
| 438 |
|
|
>>> daoRS2.Close()
|
| 439 |
|
|
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData')
|
| 440 |
|
|
>>> for i in caseMatrix.keys():
|
| 441 |
|
|
... if i in accessDBCLMList:
|
| 442 |
|
|
... print "yes"
|
| 443 |
|
|
... else:
|
| 444 |
|
|
... print "adding %s"% i
|
| 445 |
|
|
... daoRS2.AddNew()
|
| 446 |
|
|
... daoRS2.Fields('ClientMatterNum').Value = i
|
| 447 |
|
|
... daoRS2.Fields('Case Name').Value = caseMatrix[i]
|
| 448 |
|
|
... daoRS2.Fields('EmpID').Value = tpmID
|
| 449 |
|
|
... daoRS2.Fields('TPM').Value = tpmName
|
| 450 |
|
|
... daoRS2.Update()
|
| 451 |
|
|
...
|
| 452 |
|
|
adding 054168.0119
|
| 453 |
|
|
Traceback (most recent call last):
|
| 454 |
|
|
File "<interactive input>", line 11, in <module>
|
| 455 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 1480, in Update
|
| 456 |
|
|
, Force)
|
| 457 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Recordset', 'The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.', 'jeterr40.chm', 5003022, -2146825266), None)
|
| 458 |
|
|
>>> daoRS2.Close()
|
| 459 |
|
|
>>> daoRS1 = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 460 |
|
|
>>> daoRS1.MoveLast()
|
| 461 |
|
|
>>> fullCount = daoRS1.RecordCount
|
| 462 |
|
|
>>> daoRS1.MoveFirst()
|
| 463 |
|
|
>>> accessDBCLMList = []
|
| 464 |
|
|
>>> for i in range(fullCount):
|
| 465 |
|
|
... accessDBCLMList.append(daoRS1.Fields('ClientMatterNum').Value)
|
| 466 |
|
|
... daoRS1.MoveNext()
|
| 467 |
|
|
...
|
| 468 |
|
|
>>> daoRS1.Close()
|
| 469 |
|
|
>>> daoRS1 = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 470 |
|
|
>>> daoRS1 = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData WHERE EmpID='09756'")
|
| 471 |
|
|
>>> daoRS1.MoveLast()
|
| 472 |
|
|
>>> fullCount = daoRS1.RecordCount
|
| 473 |
|
|
>>> daoRS1.MoveFirst()
|
| 474 |
|
|
>>> accessDBCLMList = []
|
| 475 |
|
|
>>> for i in range(fullCount):
|
| 476 |
|
|
... accessDBCLMList.append(daoRS1.Fields('ClientMatterNum').Value)
|
| 477 |
|
|
... daoRS1.MoveNext()
|
| 478 |
|
|
...
|
| 479 |
|
|
>>> daoRS1.Close()
|
| 480 |
|
|
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData')
|
| 481 |
|
|
>>> for i in caseMatrix.keys():
|
| 482 |
|
|
... if i in accessDBCLMList:
|
| 483 |
|
|
... print "yes"
|
| 484 |
|
|
... else:
|
| 485 |
|
|
... print "adding %s"% i
|
| 486 |
|
|
... daoRS2.AddNew()
|
| 487 |
|
|
... daoRS2.Fields('ClientMatterNum').Value = i
|
| 488 |
|
|
... daoRS2.Fields('Case Name').Value = caseMatrix[i]
|
| 489 |
|
|
... daoRS2.Fields('EmpID').Value = tpmID
|
| 490 |
|
|
... daoRS2.Fields('TPM').Value = tpmName
|
| 491 |
|
|
... daoRS2.Update()
|
| 492 |
|
|
...
|
| 493 |
|
|
yes
|
| 494 |
|
|
yes
|
| 495 |
|
|
yes
|
| 496 |
|
|
yes
|
| 497 |
|
|
adding 049700.0063
|
| 498 |
|
|
Traceback (most recent call last):
|
| 499 |
|
|
File "<interactive input>", line 11, in <module>
|
| 500 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 1480, in Update
|
| 501 |
|
|
, Force)
|
| 502 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Recordset', 'The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.', 'jeterr40.chm', 5003022, -2146825266), None)
|
| 503 |
|
|
>>> daoRS2.Close()
|
| 504 |
|
|
>>> daoRS1 = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData")
|
| 505 |
|
|
>>> daoRS1.MoveLast()
|
| 506 |
|
|
>>> fullCount = daoRS1.RecordCount
|
| 507 |
|
|
>>> daoRS1.MoveFirst()
|
| 508 |
|
|
>>> accessDBCLMList = []
|
| 509 |
|
|
>>> for i in range(fullCount):
|
| 510 |
|
|
... accessDBCLMList.append(daoRS1.Fields('ClientMatterNum').Value)
|
| 511 |
|
|
... daoRS1.MoveNext()
|
| 512 |
|
|
...
|
| 513 |
|
|
>>> daoRS1.Close()
|
| 514 |
|
|
>>> daoRS2 = daoDB.OpenRecordset('SELECT * FROM tbl_MatterTrackingData')
|
| 515 |
|
|
>>> for i in caseMatrix.keys():
|
| 516 |
|
|
... if i in accessDBCLMList:
|
| 517 |
|
|
... print "yes"
|
| 518 |
|
|
... else:
|
| 519 |
|
|
... print "adding %s"% i
|
| 520 |
|
|
... daoRS2.AddNew()
|
| 521 |
|
|
... daoRS2.Fields('ClientMatterNum').Value = i
|
| 522 |
|
|
... daoRS2.Fields('Case Name').Value = caseMatrix[i]
|
| 523 |
|
|
... daoRS2.Fields('EmpID').Value = tpmID
|
| 524 |
|
|
... daoRS2.Fields('TPM').Value = tpmName
|
| 525 |
|
|
... daoRS2.Update()
|
| 526 |
|
|
...
|
| 527 |
|
|
yes
|
| 528 |
|
|
yes
|
| 529 |
|
|
yes
|
| 530 |
|
|
yes
|
| 531 |
|
|
yes
|
| 532 |
|
|
yes
|
| 533 |
|
|
yes
|
| 534 |
|
|
adding 083980.0011
|
| 535 |
|
|
yes
|
| 536 |
|
|
yes
|
| 537 |
|
|
adding 076834.0012
|
| 538 |
|
|
adding 057157.0010
|
| 539 |
|
|
adding 076326.0024
|
| 540 |
|
|
yes
|
| 541 |
|
|
adding 054168.0120
|
| 542 |
|
|
yes
|
| 543 |
|
|
adding 088269.0011
|
| 544 |
|
|
adding 085871.0011
|
| 545 |
|
|
yes
|
| 546 |
|
|
adding 083128.0011
|
| 547 |
|
|
adding 039323.0308
|
| 548 |
|
|
adding 082506.0013
|
| 549 |
|
|
adding 087097.0011
|
| 550 |
|
|
yes
|
| 551 |
|
|
yes
|
| 552 |
|
|
>>> daoRS2.Close()
|
| 553 |
|
|
>>> daoRS1.Close()
|
| 554 |
|
|
Traceback (most recent call last):
|
| 555 |
|
|
File "<interactive input>", line 1, in <module>
|
| 556 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 1384, in Close
|
| 557 |
|
|
return self._oleobj_.InvokeTypes(133, LCID, 1, (24, 0), (),)
|
| 558 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Recordset', 'Object invalid or no longer set.', 'jeterr40.chm', 5003420, -2146824868), None)
|
| 559 |
|
|
>>> daoRS1 = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData")
|
| 560 |
|
|
>>> daoRS1.MoveLast()
|
| 561 |
|
|
>>> fullCount = daoRS1.RecordCount
|
| 562 |
|
|
>>> daoRS1.MoveFirst()
|
| 563 |
|
|
>>> accessMatrix = {}
|
| 564 |
|
|
>>> for i in range(fullCount):
|
| 565 |
|
|
... accessMatrix[(daoRS1.Fields('ClientMatterNum').Value)] = daoRS1.fields('TMP').Value
|
| 566 |
|
|
... daoRS1.MoveNext()
|
| 567 |
|
|
...
|
| 568 |
|
|
Traceback (most recent call last):
|
| 569 |
|
|
File "<interactive input>", line 2, in <module>
|
| 570 |
|
|
File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 454, in __getattr__
|
| 571 |
|
|
raise AttributeError, "'%s' object has no attribute '%s'" % (repr(self), attr)
|
| 572 |
|
|
AttributeError: '<win32com.gen_py.Microsoft DAO 3.6 Object Library.Recordset instance at 0x15334936>' object has no attribute 'fields'
|
| 573 |
|
|
>>> for i in range(fullCount):
|
| 574 |
|
|
... accessMatrix[(daoRS1.Fields('ClientMatterNum').Value)] = daoRS1.Fields('TMP').Value
|
| 575 |
|
|
... daoRS1.MoveNext()
|
| 576 |
|
|
...
|
| 577 |
|
|
Traceback (most recent call last):
|
| 578 |
|
|
File "<interactive input>", line 2, in <module>
|
| 579 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 848, in __call__
|
| 580 |
|
|
ret = self._oleobj_.InvokeTypes(0, LCID, 2, (13, 0), ((12, 1),),Item
|
| 581 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Fields', 'Item not found in this collection.', 'jeterr40.chm', 5003265, -2146825023), None)
|
| 582 |
|
|
>>> for i in range(fullCount):
|
| 583 |
|
|
... accessMatrix[(daoRS1.Fields('ClientMatterNum').Value)] = daoRS1.Fields('TMP').Value
|
| 584 |
|
|
... daoRS1.MoveNext()
|
| 585 |
|
|
...
|
| 586 |
|
|
>>> daoRS1.MoveFirst()
|
| 587 |
|
|
>>> for i in range(fullCount):
|
| 588 |
|
|
... accessMatrix[(daoRS1.Fields('ClientMatterNum').Value)] = daoRS1.Fields('TPM').Value
|
| 589 |
|
|
... daoRS1.MoveNext()
|
| 590 |
|
|
...
|
| 591 |
|
|
>>> daoRS1.Close()
|
| 592 |
|
|
>>> for i in caseMatrix.keys():
|
| 593 |
|
|
... if i in accessMatrix.keys():
|
| 594 |
|
|
... print "this case is already in the matter DB and it's owned by %s"% accessMatrix[i]
|
| 595 |
|
|
... else:
|
| 596 |
|
|
... print "adding %s"% i
|
| 597 |
|
|
...
|
| 598 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 599 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 600 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 601 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 602 |
|
|
this case is already in the matter DB and it's owned by Skowron, David
|
| 603 |
|
|
this case is already in the matter DB and it's owned by Skowron, David
|
| 604 |
|
|
this case is already in the matter DB and it's owned by Patterson, Shirela
|
| 605 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 606 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 607 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 608 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 609 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 610 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 611 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 612 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 613 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 614 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 615 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 616 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 617 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 618 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 619 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 620 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 621 |
|
|
this case is already in the matter DB and it's owned by Gardner, Daryl
|
| 622 |
|
|
this case is already in the matter DB and it's owned by Borges, Emanuel
|
| 623 |
|
|
>>> for i in caseMatrix.keys():
|
| 624 |
|
|
... if i in accessMatrix.keys():
|
| 625 |
|
|
... print "The %s case is already in the matter DB and it's owned by %s"%(i, accessMatrix[i])
|
| 626 |
|
|
... else:
|
| 627 |
|
|
... print "adding %s"% i
|
| 628 |
|
|
...
|
| 629 |
|
|
The 054168.0119 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 630 |
|
|
The 039323.0292 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 631 |
|
|
The 086400.0016 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 632 |
|
|
The 024032.0376 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 633 |
|
|
The 049700.0063 case is already in the matter DB and it's owned by Skowron, David
|
| 634 |
|
|
The 073987.0010 case is already in the matter DB and it's owned by Skowron, David
|
| 635 |
|
|
The 082185.0012 case is already in the matter DB and it's owned by Patterson, Shirela
|
| 636 |
|
|
The 083980.0011 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 637 |
|
|
The 072810.0028 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 638 |
|
|
The 083614.0013 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 639 |
|
|
The 076834.0012 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 640 |
|
|
The 057157.0010 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 641 |
|
|
The 076326.0024 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 642 |
|
|
The 080616.0015 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 643 |
|
|
The 054168.0120 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 644 |
|
|
The 084597.0011 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 645 |
|
|
The 088269.0011 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 646 |
|
|
The 085871.0011 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 647 |
|
|
The 071082.0022 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 648 |
|
|
The 083128.0011 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 649 |
|
|
The 039323.0308 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 650 |
|
|
The 082506.0013 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 651 |
|
|
The 087097.0011 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 652 |
|
|
The 030790.0247 case is already in the matter DB and it's owned by Gardner, Daryl
|
| 653 |
|
|
The 084974.0011 case is already in the matter DB and it's owned by Borges, Emanuel
|
| 654 |
|
|
>>> len(caseMatrix.keys())
|
| 655 |
|
|
25
|
| 656 |
|
|
>>> len(responsibleCases)
|
| 657 |
|
|
26
|
| 658 |
|
|
>>> daoRS1.Close()
|
| 659 |
|
|
Traceback (most recent call last):
|
| 660 |
|
|
File "<interactive input>", line 1, in <module>
|
| 661 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 1384, in Close
|
| 662 |
|
|
return self._oleobj_.InvokeTypes(133, LCID, 1, (24, 0), (),)
|
| 663 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Recordset', 'Object invalid or no longer set.', 'jeterr40.chm', 5003420, -2146824868), None)
|
| 664 |
|
|
>>> daoRS2.Close()
|
| 665 |
|
|
Traceback (most recent call last):
|
| 666 |
|
|
File "<interactive input>", line 1, in <module>
|
| 667 |
|
|
File "C:\Python25\lib\site-packages\win32com\gen_py\00025E01-0000-0000-C000-000000000046x0x5x0.py", line 1384, in Close
|
| 668 |
|
|
return self._oleobj_.InvokeTypes(133, LCID, 1, (24, 0), (),)
|
| 669 |
|
|
com_error: (-2147352567, 'Exception occurred.', (0, 'DAO.Recordset', 'Object invalid or no longer set.', 'jeterr40.chm', 5003420, -2146824868), None)
|
| 670 |
|
|
>>> daoRS2 = daoDB.OpenRecordset("SELECT * FROM tbl_MatterTrackingData WHERE ClientMatterNum='039323.0308'")
|
| 671 |
|
|
>>> daoRS2.Edit()
|
| 672 |
|
|
>>> daoRS2.Fields('Review Platform').Value = 'Concordance'
|
| 673 |
|
|
>>> daoRS2.Update()
|
| 674 |
|
|
>>> daoRS2.Close()
|
| 675 |
|
|
>>> daoDB.Close()
|
| 676 |
|
|
>>> |