Results 1 to 5 of 5

Thread: Database Insert problem

  1. #1
    (6)
    (6) is offline
    Newbie (6)'s Avatar
    Join Date
    Oct 2004
    Posts
    47

    Question Database Insert problem

    When i insert filenames of mp3's using VB6 into an access databse that have a file name like ..

    What's
    or
    a&e

    i get an error

    I understand that its the characters ( ' & that are causing me greif but i am unable to find a solution to my problem. I hope someone can help me out. I will still be searching the forums and search engines for a soulution until someone can help.

    Thanks in advance..

  2. #2
    Clover Grayscale's Avatar
    Join Date
    May 2004
    Location
    Arkansas
    Posts
    1,549
    Uhh can you post a snippet of your code? It's obviously a parse error.
    CarPC install is starting to come along again...

  3. #3
    Raw Wave hijinks21's Avatar
    Join Date
    May 2002
    Location
    Albany, NY
    Posts
    1,803
    i dunno about with that.. but in mysql you single quote it like

    insert into table(col1, col2) values('bla $& bla', ' what's up?')
    '98 Explorer Sport
    http://mp3car.zcentric.com (down atm)
    AMD 800mhz 192megs RAM 60gig hard drive 9 inch widescreen VGA
    80% done

  4. #4
    (6)
    (6) is offline
    Newbie (6)'s Avatar
    Join Date
    Oct 2004
    Posts
    47
    Quote Originally Posted by hijinks21
    i dunno about with that.. but in mysql you single quote it like

    insert into table(col1, col2) values('bla $& bla', ' what's up?')

    Im entering info from a variable so if i single quote a variable called 'file'
    Its going to just enter the word file.
    I tried using a replace function to replace the ' or & smbol with a quuote around it but that did work .

  5. #5
    (6)
    (6) is offline
    Newbie (6)'s Avatar
    Join Date
    Oct 2004
    Posts
    47

    Figured it out

    Thanks for any assistance that was given, But trial and error resolved this one. Thank god for debug

Similar Threads

  1. Lilliput TouchKit problem solved!
    By AAVfReaK in forum LCD/Display
    Replies: 4
    Last Post: 11-07-2010, 09:29 AM
  2. Replies: 13
    Last Post: 09-23-2006, 11:34 AM
  3. Database build question
    By tmar89 in forum Media Engine
    Replies: 7
    Last Post: 08-17-2004, 12:21 PM
  4. Database question?
    By jagreen2 in forum Software & Software Development
    Replies: 11
    Last Post: 02-12-2004, 10:19 PM
  5. Annoying problem
    By c-dawg in forum General Hardware Discussion
    Replies: 1
    Last Post: 07-22-2002, 09:19 PM

Bookmarks

Posting Permissions

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