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

  • Home
  • SEARCH
  • 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 6839439
In Process

The Archive Base Latest Questions

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

Dim MyInsert As String = INSERT INTO Inventory(userid, Type,Number) Values( & _ txtEquipCat.text &

  • 0
Dim MyInsert As String = "INSERT INTO Inventory(userid,
Type,Number) Values(" & _
txtEquipCat.text & "," & _
Type.Text & "," & _
Number.text & ")"

while executing this im getting

syntax error:Insert in to statement

error.

How to insert keywords like type and number in to MDB?
I want to specify the columnname while insert.

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

    First of all, use parameters. Secondly, your string concoction isn’t putting “quotes” around the text.

    That is, VALUES ('" & txtEquipCat.Text & "',...

    Don’t try to fix it like that though.

    Use parameters: VALUES (?, ?, ?)

    cmd.Parameters.AddWithValue("?", txtEquipCat.Text)
    

    Notice with parameters, you do not have to worry about any quotation marks. The parameters have to be entered in order, so the first “?” corresponds to txtEquipCat, the second to Type.Text, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dim str as string = <request id=value1 type=value2>value3</request> How could select the values as
dim dataType as String toolTip=Marks And Number[String] I want to get the [String] alone.
Consider: Dim line As String Using readFile As New StreamReader(SalesUpdateFile) While (line = readFile.ReadLine)
Here is the sample: Dim TestString As String = Hello, & Chr(0) & World
Dim strTest(recordSet.Count)() As String While index < recordSet.Count strTest(index)(recordset.item(index).getvalue(0).tostring, recordset.item(index).getvalue(0).tostring, recordset.item(index).getvalue(0).tostring) index +=1 End
Dim SecondName As String = SecondNameTxtBox.text() Is the above statement a correct one? Here
Dim aryName As String() = Nothing aryName = File.ReadAllLines(Application.StartupPath & \Random\fnames.txt) Dim randomWords As
Dim sort_slots_sql As String sort_slots_sql = _ select date, part, service, slot & _
Dim xbg As Rm xbg.LobId = cmb_lob.SelectedValue xbg.Mobile = mobno.Text xbg.BusinessFax = faxno.Text xbg.BusinessPhone
dim shell,x,y x=D:\d y=c.bat & x set shell=createobject(wscript.shell) shell.run y shell.run a.bat set shell=nothing

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.