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 6543537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:21:31+00:00 2026-05-25T11:21:31+00:00

I am new to prepared statements in vb.net and Microsoft SQL Server 2008. I

  • 0

I am new to prepared statements in vb.net and Microsoft SQL Server 2008. I can’t really find any good sources for connecting to a database via connection string and executing prepared statements. Could someone show me an example or point me to a resource that might be useful?

  • 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-25T11:21:32+00:00Added an answer on May 25, 2026 at 11:21 am

    Prepared statements are nothing but Parametrized SqlCommands enclosed in a Transaction.

    For example, this is a Prepared Statement:

    Using c As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
       c.Open()
    using mytransaction = c.BeginTransaction()
    
       Dim command = New SqlCommand("INSERT INTO yourtable(image) values (@image)", c)
       ''# this is specific to the FileUploadControl but the idea is to get the
       ''#image in a byte array; however you do it, it doesn't matter
        Dim buffer(FileUpload1.PostedFile.ContentLength) As Byte
        FileUpload1.PostedFile.InputStream.Read(buffer, 0, buffer.Length)
        command.Parameters.AddWithValue("@image", buffer)
        command.ExecuteNonQuery()    
     mytransaction .Commit()
    End Using
    End Using
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm relatively new to MySQLi prepared statements, and running into an error. Take this
I'm new to PHP and PDO, and I try to use prepared statements here.
I am new to using prepared statements in mysql with php. I need some
I have done this before but am quite new to mysqli and prepared statements
I’m moving some old code over to the new msqli interface using prepared statements,
I've been reading a bit about Prepared statements with MySql, and the .NET/Connector does
I have been learning to use prepared and bound statements for my sql queries,
I can't configure org.hibernate.type (logging bind variables used in hibernate prepared statements) using log4j.xml,
I am pretty new to prepared statements, I am currently working through all my
I'm having trouble finding good documentation on pdo update prepared statements and even more

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.