To get an xml file automatically we are currently storing all attribute table of sql server DB into a enterprise GDB in sql server, which is creating a trouble that everytime it is taking the primary key field as OBJECTID and changing the name of the field. So we want now to have the attribute table as it is in a non-spatial database, and want to read it's table name, field names and datatype into an xml file. But I cannot read the field names and data type as a list thus I can use it inside our own schema. Can anyone please guide me.?
Solved
exporting sql server non-spatial table info as xml file?
Best answer by steveatsafe
I think you might have success using the SQL Server System Catalog... this would allow you to query (SQLCreator/Executer) your database for a specific schema and pull back tables, attributes and data types. Then you will have full control to push these to XML. I think this is what you are after. Check out Microsoft's post on the SQL Server System Catalog. Click the link called "How do I find the data types of the columns of a specified table?"
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.