[VB6] Lame problem, help please
Yeah, I know, it's really lame, but I don't know how to fix it.. lol
Anyway, I'm making an app that can generate SQL scripts for a private server. I have 2 buttons, one saying Start, one Next. When I press start it goes:
Code:
Text4.Text = "INSERT INTO blabla (blabla, bla, blah, blehe) VALUES (" + Text1.Text + ", " + Text2.Text + ", " + Text3.Text + ", " + Text5.Text + ")"
(into a text box)
Then, when I press Next, I'd like it to add another line, so it looks like this:
Quote:
INSERT INTO blabla (blabla, bla, blah, blehe) VALUES (bla, bla, bla, bla), (bla, bla, bla,bla)
The thing is that when I press Next, the new "(bla, bla, bla,bla)" replaces the whole box instead of adding it to the rest.
How do I make it add it after?
Hope I explained well and waiting for help =)
Re: [VB6] Lame problem, help please
Try Flatfile mate.
Much easier :)
Re: [VB6] Lame problem, help please
Quote:
Originally Posted by
weaxer
Yeah, I know, it's really lame, but I don't know how to fix it.. lol
Anyway, I'm making an app that can generate SQL scripts for a private server. I have 2 buttons, one saying Start, one Next. When I press start it goes:
Code:
Text4.Text = "INSERT INTO blabla (blabla, bla, blah, blehe) VALUES (" + Text1.Text + ", " + Text2.Text + ", " + Text3.Text + ", " + Text5.Text + ")"
(into a text box)
Then, when I press Next, I'd like it to add another line, so it looks like this:
The thing is that when I press Next, the new "
(bla, bla, bla,bla)" replaces the whole box instead of adding it to the rest.
How do I make it add it after?
Hope I explained well and waiting for help =)
Simple do a concatenation use & Example
Code:
Text4.Text = Text4.text & "INSERT INTO blabla (blabla, bla, blah, blehe) VALUES (" + Text1.Text + ", " + Text2.Text + ", " + Text3.Text + ", " + Text5.Text + ")"
and if you just want bla bla bla part same thing
Code:
Text4.Text = Text4.text & "VALUES (" + Text1.Text + ", " + Text2.Text + ", " + Text3.Text + ", " + Text5.Text + ")""
Might have too many quotes at the end my bad.
Don't mention it!
Re: [VB6] Lame problem, help please
Wow thank you, I didn't know it was so easy.
Re: [VB6] Lame problem, help please
Get vb2008, I have so much knowledge of vb6 but rather like vb2008 because you can do way more things. Just a suggestion but if you need any help give me a call.
Re: [VB6] Lame problem, help please
Quote:
Originally Posted by
giro58
Get vb2008, I have so much knowledge of vb6 but rather like vb2008 because you can do way more things. Just a suggestion but if you need any help give me a call.
TBh, I only like VB8 coz of the stylish XP buttons :D
But yeah, I have loads of knowledge in VB6 not VB8 -.-