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 is explained here: http://msdn.microsoft.com/en-US/library/d1ae6tz5%28v=VS.80%29.aspx What I don't get from that article is
I'm in the process of designing a .NET library and I'm looking for some
I have a process as follows: User does a complex search that is done
I have a process that imports a daily file of product registrations, and adds
I have a working process, behind a web application, that is generating some records
If there was a process on the user's desktop, would Silverlight be able to
I'm in the process of learning LINQ and would like some help the following
I have a process that I need to make into a service. This process
I have a MAIN process that spawn an implementation of a gen_fsm behavior, but
I'm in the process of creating a framework in which I provide the base

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.