Inserting values in a oracle databse using oledb in vb .net, VS 2008

后端 未结 1 967
走了就别回头了
走了就别回头了 2021-01-28 14:22
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 Ol         


        
相关标签:
1条回答
  • 2021-01-28 15:04

    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 讨论(0)
提交回复
热议问题