Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
* * * * * 1 votes

Converting DB values into strings

delphi string

  • Please log in to reply
5 replies to this topic

#1 ashleysmithd

ashleysmithd

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 12 April 2007 - 06:58 AM

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.
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 12 April 2007 - 09:07 AM

Try DBEdit1.Field.AsString or DBEdit1.Text or DBEdit1.EditText
  • -1

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 ashleysmithd

ashleysmithd

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 12 April 2007 - 09:40 AM

Try DBEdit1.Field.AsString or DBEdit1.Text or DBEdit1.EditText

It worked!

You're a life saver... thanks! :)
  • 0

#4 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 13 April 2007 - 08:26 AM

No problem. I'm glad it worked.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#5 ashleysmithd

ashleysmithd

    CC Lurker

  • Just Joined
  • Pip
  • 9 posts

Posted 23 April 2007 - 12:09 PM

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.
  • 0

#6 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 24 April 2007 - 08:21 AM

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?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download