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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:36:02+00:00 2026-06-13T12:36:02+00:00

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim insertOk

  • 0
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim insertOk As Boolean = True
        Dim con1 As OleDb.OleDbConnection
        Dim cmd As OleDb.OleDbCommand
        Dim query As String
        Dim temp As Integer
        con1 = New OleDb.OleDbConnection("Provider=MSDAORA.1;Data Source=localhost;Persist Security Info=True;Password=sys;User ID=nitishok")

        con1.Open()

        query = "insert into APPLICANTS(APPLICANT_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,SEX,F_H,TOWN,TALUKA,DISTRICT,LANDLINE,MOBILE,BLOOD_GROUP,EDU,DOB) values(:aid,:fn,:mn,:ln,:s,:fh,:tw,:tl,:ds,:land,:mob,:bg,:edu,:dob)"

        cmd = New OleDb.OleDbCommand(query, con1)

        cmd.Parameters.Add(":aid", OleDb.OleDbType.VarChar).Value = TextBox7.Text
        cmd.Parameters.Add(":fn", OleDb.OleDbType.LongVarChar).Value = TextBox1.Text
        cmd.Parameters.Add(":mn", OleDb.OleDbType.LongVarChar).Value = TextBox12.Text
        cmd.Parameters.Add(":ln", OleDb.OleDbType.LongVarChar).Value = TextBox11.Text
        cmd.Parameters.Add(":s", OleDb.OleDbType.LongVarChar).Value = ComboBox1.Text
        cmd.Parameters.Add(":fh", OleDb.OleDbType.LongVarChar).Value = TextBox2.Text
        cmd.Parameters.Add(":tw", OleDb.OleDbType.LongVarChar).Value = TextBox10.Text
        cmd.Parameters.Add(":tl", OleDb.OleDbType.LongVarChar).Value = TextBox8.Text
        cmd.Parameters.Add(":ds", OleDb.OleDbType.LongVarChar).Value = TextBox9.Text
        cmd.Parameters.Add(":land", OleDb.OleDbType.LongVarChar).Value = TextBox5.Text
        cmd.Parameters.Add(":mob", OleDb.OleDbType.LongVarChar).Value = TextBox6.Text
        cmd.Parameters.Add(":bg", OleDb.OleDbType.LongVarChar).Value = ComboBox2.Text
        cmd.Parameters.Add(":edu", OleDb.OleDbType.LongVarChar).Value = TextBox4.Text

        cmd.Parameters.Add(":dob", OleDb.OleDbType.Date).Value = DateTimePicker1.Value

        cmd.CommandType = CommandType.Text
        temp = cmd.ExecuteNonQuery()


        If temp > 0 Then
            MessageBox.Show("Record Added!")
        Else
            MessageBox.Show("Record Not Added!")
        End If

        con1.Close()
    End Sub

im totally new with vb .net. im doing a simple project for my term work.

please explain to me how to insert values.

im getting this errer ORA-01008: not all variables bound….

im using vb.net VS 2008
oracle database
oledb connection

  • 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-13T12:36:02+00:00Added an answer on June 13, 2026 at 12:36 pm

    Use question (?) placeholder instead of named parameters because you’re using System.Data.OleDb. I’d suggest to download ODP.NET – Oracle Data Provider for .NET.

    For instance,

    query = "insert into APPLICANTS(APPLICANT_ID,FIRST_NAME) values(?,?)"
    cmd.Parameters.Add("?", OleDb.OleDbType.VarChar,30).Value = TextBox7.Text
    cmd.Parameters.Add("?", OleDb.OleDbType.LongVarChar,40).Value = TextBox1.Text
    ....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim p
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim FILE_NAME
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click CheckBox1.Checked =
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Dim allowedChars
My Code: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim de As New System.DirectoryServices.DirectoryEntry() Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
NET WinForms. VB code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
I can't download any file with following code: Private Sub Button2_Click(ByVal sender As System.Object,
I have the current code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
Using this in VB 2010: Imports System.Text.RegularExpressions Public Class Form1 Private Sub Button1_Click(ByVal sender

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.