DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: truncating a very long line with mysql involveds?

  1. #1
    Join Date
    Jun 2006
    Posts
    290

    truncating a very long line with mysql involveds?

    Hi there, i have a VERY LONG conn.execute string putting information into a mysql database.... when i try to run the program it says line too long, how cai i truncate it down a bit?

    instead of a very long line here that makes everything happen.....

    can i have a line_
    that somehow truncates_
    similar to this i think the_
    underscore might come into play_
    any ideas??


    Thanks so much

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    Use fewer line continuation characters, use multiple concatenation statements or remove some of the unnecessary connection string settings.

    I'm not sure what is generating the error but it might help to post a snippet of code and identify where it occurs.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Jun 2006
    Posts
    290
    conn.Execute "INSERT INTO `clients` ( `name`, `restaurant`, `address1`, `address2`, `city`, `state`,`zip`, `country`, `phone`,`website`, `email`, `hood`, `hoursm`, `hourstu`, `hoursw`, `hoursth`, `hoursf`,`hourssa`, `hourssu`, `cash`, `checks`, `visa`,`mastercard`, `amex`, `dinersclub`, `discover`, `privchef`, `reservations`, `walkins`, `atm`, `carryout`, `catering`, `childmenu`, `delivery`, `patio`, `parking`, `valet`, `vip`, `smoking`, `handicap`, `execchef`, `dresscode`, `breakfast`, `brunch`, `lunch`, `dinner`, `cdrating`, `ratecomments`, `cuisine`, `price`, `fullbar`, `beerwine`, `wine`, `nobar`, `description`, `featureddish`) VALUES( '" & Text1.Text & "' , '" & Text2.Text & "' , '" & Text7.Text & "' , '" & Text8.Text & "' , '" & Text9.Text & "' , '" & Text10.Text & "' , '" & Text11.Text & "' , '" & Text12.Text & "' , '" & Text13.Text & "' , '" & Text14.Text & "' , '" & Text15.Text & "' , '" & Text16.Text & "' , '" & Text17.Text & "' , '" & Text18.Text & "' , '" & Text19.Text & "')"

  4. #4
    Join Date
    Jun 2006
    Posts
    290
    and thats only about 1/2 way finished i have ALOT more to put in there

  5. #5
    Join Date
    Dec 2003
    Posts
    2,750
    How about using a parameter query with the Command object, or better yet a stored procedure instead?
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Similar Threads

  1. Removing System Tray shortcuts
    By James Brown in forum VB Classic
    Replies: 8
    Last Post: 03-05-2002, 01:54 PM
  2. Getting remote registry entries
    By Pedro Avila in forum VB Classic
    Replies: 4
    Last Post: 04-02-2001, 11:31 AM
  3. Problems with NetAddUser
    By Jeff Morgan in forum VB Classic
    Replies: 0
    Last Post: 02-11-2001, 01:54 PM
  4. How do I detect an FTP timeout?
    By Julian Milano in forum VB Classic
    Replies: 0
    Last Post: 08-10-2000, 09:16 PM
  5. Trying to print a PDF File from VB
    By Kunal Sharma in forum VB Classic
    Replies: 2
    Last Post: 04-25-2000, 03:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center