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

  • Home
  • SEARCH
  • 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 8069561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:05:25+00:00 2026-06-05T13:05:25+00:00

I am creating a VB application in Visual Studio 2010 that installs some SQL

  • 0

I am creating a VB application in Visual Studio 2010 that installs some SQL stored procedures. These stored procedures are encrypted otherwise I would just supply my clients with .sql files to create the stored procedures.

The install script that creates the stored procedure is 1500 lines in length and has been formatted in the way VS 2010 requires multi-line literals to be in:

"First Line" & _  
"Second Line" & _  
"etc..."

Every time I paste the multi-line script into Visual Studio the application crashes. Anyone have better way of assigning a very large string literal to a string variable. What I require is the following:

Imports System.Data.Sql Client

…

cmd cmd as SqlCommand
dim str as string

str = _
    "Very" & _
    "Long" & _
    ... 1500 lines ...
    "String"

cmd.CommandText = str

or some other way of assigning a .sql script to a SqlCommand.

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-06-05T13:05:26+00:00Added an answer on June 5, 2026 at 1:05 pm

    Could either paste it in Notepad and save it there, or split it in multiple strings that you just concatenate at the end.

    Or even better, put the command in a resource file and load the resource at run time!

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

Sidebar

Related Questions

I am new in creating application using Visual Studio 2010 and Microsoft Access 2007.
I am new in creating application in Visual Studio 2010. I recently created an
I'm creating an application in C# using Visual Studio 2010/.NET 4.0. For part of
I'm creating an application using Visual Studio 2010 C#. I have a string in-line
I'm creating an application in Visual Studio 2010 C# and MySQL where the user
I have an asp.net web application (c#) in visual studio 2010 that is heavily
I'm new to Visual Studio 2010 C# and I'm creating an application where the
I am creating a Windows Forms Application using Visual Studio 2010. I populate data
I've been creating an application using Visual Studio 2010 C# and Microsoft Access 2007.
I'm creating a Windows Service Application in Visual Studio 2010 Ultimate SP1. I was

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.