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

The Archive Base Latest Questions

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

It has been way to long since I have been involved in VB so

  • 0

It has been way to long since I have been involved in VB so I need some help here. I have the following in my C# code

SqlParameter[] param = new SqlParameter[0];
 ...some code...
param = new SqlParameter[2];
param[0] = db.MakeInputParameter("@group_id", groupid);
param[1] = db.MakeInputParameter("@organization_id", orgid);

The reason i do not initialize the size firstly is because i reuse the param variable in the same method, just in case you were wondering

The following is what I have tried but I keep getting that the variable is used before I assign a value

Dim param() As SqlParameter
...some code...
param(2) = New SqlParameter
param(0) = db.MakeInputParameter("@group_id", groupid)
param(1) = db.MakeInputParameter("@organization_id", orgid)

How do I convert this type of logic to VB.Net

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

    Use ReDim

    Dim param() As SqlParameter
    Redim param(1) 'The value VB.NET array subscript uses upper-bound.
    

    Or

    param = New SqlParameter(1) {}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an FBO which has been created in the following way: glGenRenderbuffers(1, &m_depthStencilBuffer);
It has been a long while since I have really worked with J2EE so
Is there a way to test, using Python, how long the system has been
I believe this questions has been asked in some or the other way but
Once code has been written, the only way I know of to view the
Probably simple question but it has been a long time since i work with
It has been a really long time since I used flash and I am
I have some old rrdtool databases, for which the exact creation recipe has long
It's been a long time since I have designed a DB as a Database
I have a tar backup from an old subversion server which has long since

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.