![sqlpro for mssql create table from table sqlpro for mssql create table from table](https://database.guide/wp-content/uploads/2018/07/JSON-Results-SQLOPS.gif)
Private Sub populate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles populate.ClickĬonn = New SqlConnection(ConnString.Text)ĭim adapter As New SqlDataAdapter("SELECT * FROM " & Table.Text & " ", conn) Than I coded a little test program, which creates a dynamic create table string, executes it than uses bulkcopy to copy the contents of the datatable into the database. What I did to fix this was create custom datatypes in MSSQL like so. I wanted to take a MSSQL database table on a client dump it into a datatable in my app then push that datatable to a webservices running on a remote server than have that webservice create that same table on the servers copy of MSSQL.Īnyways the problem I had was that the datatable stores all the data types in VB.NET data types and not MSSQL data types so the MSSQL data type int becomes int32, real becomes single. Just so everyone fully understands what I was trying to accomplish I'm gonna rewrite it here. Hey just thought I would post my own follow-up since I figured out a pretty slick way to do what I needed to do.