Select to view content in your preferred language

Using vb.net to add a standalone table in a SQL database.

482
1
09-16-2010 09:24 AM
DavidKelly1
Emerging Contributor
I am using ArcGIS 9.2 and vb.net.  I need to add a standalone table in SQL Server to ArcMap.  I have the code to connect to the database but I am not sure how to get the table.

Here is the code for the connection string:

        Dim conn As New SqlConnection()

        conn.ConnectionString = "Data Source= EFRFBA-KELLYD-L;Initial Catalog = wts_rayonier;Persist Security Info=True;User ID=wts_rayonier;Password=wts_rayonier"

        conn.Open()


Thanks,

David Kelly
0 Kudos
1 Reply
JamesMacKay
Deactivated User
Hi David,

Take a look at the SqlCommand class. Once its properties are set correctly, you can use one of its methods (ExecuteNonReader or something like that I think) to execute DDL.

Cheers,
James
0 Kudos