Hi!
I have a SQL Server database of tables that I would like to convert to domains. The tables have an int field that I would like to use for the code field and a varchar field I would like to use for the description field.
When I attempt to run the Table to Domain geoprocessing tool, only the varchar field appears in the dropdowns.

If I try running the tool from the command line using,
arcpy<SPAN class="punctuation token">.</SPAN>TableToDomain_management<SPAN class="punctuation token">(</SPAN>r<SPAN class="string token">'D:\Path to database\places.sde\CreditCardType'</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"CreditCardType_id"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"TypeName"</SPAN><SPAN class="punctuation token">,</SPAN>r<SPAN class="string token">'D:\Path to fgdb\New_DB.gdb'</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"CreditCardDomain"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"Valid Credit Card Types"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
I get the following error:
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000308: Invalid field type
Failed to execute (TableToDomain).
The description for that error is "The field entered must be of a specific type.". The Help doc for Table to Domain doesn't specify what field types are valid. I can use Table to Domain on an fgdb table with an int field. Is this specific to SQL Server?
ETA: this appears to only be an issue when a primary key restraint is applied to the int field. Does anyone have a workaround for this?
Thanks!
Jill