Question...why would I have to create a table in memory...If I have a table in SQL Server.
THanks for your replyTHe SQL connection see very famililar to others so I dont think that is going to be much of a problem.ON the other hand creating an in memory table and then Geocoding to that and then using that to update the original SQL table....not getting my brain around that one....can you explain more...are there examples for this in moemory table creation..and then how wold I apply that table to the SQL Table?ThanksEDIT:1. Are you saying to create a table like in your second link with the values from the SQL Server table.2. Geocode against this table creating an output Feature Class3. Then copy over the XY from the new Feature Class to the Original Table in SQL Server4. Then Delete the Created table and Feature Class
gp.createtable_management("IN_MEMORY", "TempDT", "", "") cxRows = cursor.fetchall() rowcount = cursor.rowcount for row in range(1, rowcount - 1): tables = gp.ListTables() for tbl in tables: if tbl=="TempDT": ### add the fields for i in range(0, len(cursor.description)): val1 = str(cursor.description[0]) val2 = str(cursor.description[1]) val3 = str(cursor.description[2]) if val2=="<type 'cx_Oracle.STRING'>": fldType = "Text" val3 = cursor.description[2] gp.AddField(tbl, str(cursor.description[0]), fldType, val3) if val2=="<type 'cx_Oracle.NATIVE_FLOAT'>": fldType = "Float" gp.AddField(tbl, str(cursor.description[0]), fldType) if val2=="<type 'cx_Oracle.DATETIME'>": fldType = "Date" gp.AddField(tbl, str(cursor.description[0]), fldType) ### now populate the table insRows = gp.InsertCursor(tblNew) for cxRow in cxRows: insRow = insRows.newRow() for i in range(0, len(cursor.description)): insRow.setvalue(str(cursor.description[0]), cxRow) insRows.insertRow(insRow) cursor.close() db.close()
Although in my Case I would have to point to a SQL table, how different is the syntax for a SQL table versus an Access Database
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.