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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:41:33+00:00 2026-05-26T23:41:33+00:00

My Scenario, Im working asp.net vb application I have set of values to be

  • 0

My Scenario,

Im working asp.net vb application
I have set of values to be inserted to Database.But their some fields are optional to be filled

I need to check the textbox empty.if empty i should not enter the value to Database. How to work on this

  • 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-26T23:41:33+00:00Added an answer on May 26, 2026 at 11:41 pm

    Use Parameter collection of Command. (I presume that you have a MsSql database).

    cmd=new SqlCommand("insert into tableName values (@col1,@col2,@col3)",conn)
    If TextBox1.Text.Trim().Length=0 Then
      cmd.Parameters.Add("@col1",SqlDbType.Varchar).Value=DBNull.Value
    else
      cmd.Parameters.Add("@col1",SqlDbType.Varchar).Value=TextBox1.Text
    End If
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an asp.net application and I have the following scenario: I
Scenario : I have an ASP.NET MVC application developed in Visual Studio 2008. There
I have a scenario wherein my ASP.NET MVC 3 web application hosted in IIS
This is the scenario: I'm working on a new ASP.NET application that uses master
I had a simple working (ASP.NET) Scenario here: 3 asp:RadioButtons that each have OnCheckedChanged
iam working on asp.net &c# i am working on the following scenario. i have
I have an asp.net mvc 3 application. In this application I have a reminder
I am working on a ASP.net application written in C# with Sql Server 2000
Working on an ASP.NET MVC 3 (Razor) application, that's mainly concerned with UGC (user
I am working with an ASP.NET MVC application. There is a requirement that a

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.