Bypass or solution for using syntaxis in Access database?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Bypass or solution for using syntaxis in Access database?

  1. #1
    Join Date
    Jul 2014
    Posts
    3

    Bypass or solution for using syntaxis in Access database?

    Hi all,,

    Im a rookie programmer and Im trying to make an errorprogram for work.
    The problem that i have is: that i have a premade database which is Full of syntaxis.. one of the tablenames where i got a "insert into" error or an "syntaxis" error is at the following tablename (in dutch):

    "Storings tabel"

    There is a space between the words and it is not possible to remake the database because Its huge and Full with relations.

    The error part is on the line with da.fill:

    this is a part of the code with the error:

    con.Open()

    sql = "INSERT INTO Storings tabel(aanmelder) VALUES('" & TestTB.Text & "')"

    da = New OleDb.OleDbDataAdapter(sql, con)
    da.Fill(ds, "Storings tabel")


    Is there a way to bypass the "space" character?

    I tried an underscore or Chr(32) But it wont work.

    I hope someone can help, Thankss!

  2. #2
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,380

    Re: Bypass or solution for using syntaxis in Access database?

    Use it with [ ]:
    [Storings tabel]
    http://www.access-programmers.co.uk/...d.php?t=188963
    Victor Nijegorodov

  3. #3
    Join Date
    Jul 2014
    Posts
    3

    Arrow Re: Bypass or solution for using syntaxis in Access database?

    Quote Originally Posted by VictorN View Post
    WoW! Many Thanks, This one worked for me!
    Only I ran into a new problem in the database with the tabletext "Monteurs-Id"

    There is a dash between the words, is there also an solution for? The brackets wont help me this time with [Monteurs-Id]..

  4. #4
    Join Date
    Jul 2014
    Posts
    3

    Re: Bypass or solution for using syntaxis in Access database?

    Quote Originally Posted by Dreamiej View Post
    WoW! Many Thanks, This one worked for me!
    Only I ran into a new problem in the database with the tabletext "Monteurs-Id"

    There is a dash between the words, is there also an solution for? The brackets wont help me this time with [Monteurs-Id]..
    I Helped myself,, Many thanks for helping VictorN!!

  5. #5
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,380

    Re: Bypass or solution for using syntaxis in Access database?

    Quote Originally Posted by Dreamiej View Post
    I Helped myself,,
    How?
    Could you share your solution/workaround?
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center