-1

logo Command Eg:

Chr(29) + Chr(40) + Chr(76) + Chr(6) + Chr(0) + Chr(48) + Chr(69) + Chr(48) + Chr(49) + Chr(1) + Chr(2)

logo = datareader(logo)

I am storing this string in logo column in bill options table, but when I am retrieving this data and appending it using printstring += logo then it is not printing the logo.
Instead it is printing the same string as is Chr(29) + Chr(40) + Chr(76) + Chr(6) + Chr(0) + Chr(48) + Chr(69) + Chr(48) + Chr(49) + Chr(1) + Chr(2)

What is the problem?

Thank you.

iamdave
  • 12,023
  • 3
  • 24
  • 53
upender
  • 11
  • 5
  • You need to go learn the difference between a string and code. – Sam Axe Dec 21 '16 at 11:35
  • Thank you for your reply – upender Dec 21 '16 at 15:54
  • Thank you so much for your reply, i am so thankful to you if you let me know the difference and how can i make clear my problem.. how can i store the code in database and retrieve and use in run time by substituting in where ever i want – upender Dec 21 '16 at 15:55
  • Hi Thank you for your reply, and i am very much thankful to you if you let me know the diff between string and code and clears my Problem, – upender Dec 21 '16 at 15:57

1 Answers1

0

What Sam Axe wanted to say and what is probably your problem (you do not give much information...) is that while code and strings might look the same to you, it is not for your compiler or interpreter. Code will be executed and a string is just text.

You seem to store the text "Chr(29) + ..." in a variable that is called logo. As you wrote this is a string, so just text. Some languages have functions like "eval" that you can give strings which will be executed as code. But I would consider this bad practice, because there should be better solutions.

For example in this case you could store only the numbers of your characters and then parse them. (That means reading the numbers, translating them into characters and concatenating them.) Even better, depending on what you want to do, would probably be just storing the characters in your variable.