Closed Thread
Results 1 to 6 of 6

Thread: Converting DB values into strings

  1. #1
    Join Date
    Apr 2007
    Posts
    9
    Rep Power
    0

    Question Converting DB values into strings

    Hi.

    I'm building my project in Delphi 5 and I've just started using the database functions.

    The problem is, I want to convert the value from some of these database components into strings so I can use them with other, standard objects, such as EditBox and Label.

    Does anyone here know how to convert the value from say DBEdit into a string? Unfortunatelly the database objects aren't like the EditBoxes, they have a 'name' property but everytime I try copying across the 'name' from a DB object into a textbox or label it comes up with the name of the object and not the value. And there is no caption property.

    Any help is appreciated tnx.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    Try DBEdit1.Field.AsString or DBEdit1.Text or DBEdit1.EditText
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Join Date
    Apr 2007
    Posts
    9
    Rep Power
    0
    Quote Originally Posted by WingedPanther View Post
    Try DBEdit1.Field.AsString or DBEdit1.Text or DBEdit1.EditText
    It worked!

    You're a life saver... thanks!

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    No problem. I'm glad it worked.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    Join Date
    Apr 2007
    Posts
    9
    Rep Power
    0

    Question

    Just another quick one,

    How do you alter the DB objects values with standard objects? I'm trying to input the value from an editbox into one of the DBeditboxes. I've tried searching the help topics and searching google (along with a lot of guessing) but I couldn't find anything.

    Thanks.

  7. #6
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    I'm not sure that's possible (I'd have to research). Are you trying to change the value in the DB or just change what's shown?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Converting PHP to C
    By Nile in forum C and C++
    Replies: 3
    Last Post: 07-05-2011, 08:22 PM
  2. Converting *.swf to *.avi
    By Jackson in forum Software Development Tools
    Replies: 9
    Last Post: 01-03-2010, 05:50 AM
  3. Help - Converting values
    By ghost2012 in forum PHP Development
    Replies: 6
    Last Post: 10-29-2009, 02:43 AM
  4. Converting *.swf to *.avi
    By Reji in forum C# Programming
    Replies: 8
    Last Post: 06-18-2009, 03:44 AM
  5. Converting [willing to pay]
    By DarkWalk in forum General Programming
    Replies: 1
    Last Post: 09-28-2007, 01:25 PM

Tags for this Thread

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