Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 889999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:39:25+00:00 2026-05-15T13:39:25+00:00

I am in the process of revising code to use TVP to send data

  • 0

I am in the process of revising code to use TVP to send data from our VB.NET app to the SQL 2008 DB and try to keep all the writes atomic.

Using this page as a general guide:
http://www.sqlteam.com/article/sql-server-2008-table-valued-parameters

I am in the process of creating all the in-code datatables to be sent to the SQL stored procedure

However, I will have to create these datatables and datacolumns (then add the columns to the tables) repeatedly for multiple tables.
In my case, each of these Datatables will have layouts identical to the SQL Server table (with the exception on the autonumber PK and GUID)….

Is there a way to auto-generate this datatable creation code?
Or is there a faster way in general?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:39:25+00:00Added an answer on May 15, 2026 at 1:39 pm

    Honestly, the simplest method that I use is by using Excel. I copy the SQL Table Definition from the Design View and paste it into the first 3 rows of Excel. Then I use functions, one column for each part of the class, and build my code that way. For example,

    
    D1="Dim prm" & A1 & " As SQLParameter = tmpSqlCommand.Paramaters.Add('@" & A1 & "', SQLDbType." & B1 & ")"
    

    It may not be a code generator, but the only thing I need to do is copy the table layout and I have my classes all designed for a copy and paste. Definitely cuts down on coding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The process of converting from Visual Studio .NET 2003 to Visual Studio 2008 is
Every process can use heap memory to store and share data within the process.
Process the data handed to an html page from a form. This is my
The process I am creating needs to send data to a soap service. I
I process data from a legacy system with SSIS before importing data into a
I process data with two maps per records, one is (&,=)-formatted (id=111&name=...), the other
A process to quickly detect whether there is data in a given worksheet or
I process a lot of text/data that I exchange between Python, R, and sometimes
Our process for creating a new development (get latest, setup db, setup IIS directories
I process lots of output from Fortran programs, and it generally appears that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.