|
-
May 30th, 2000, 08:01 PM
#1
Thread Starter
New Member
Hi,
I am new to VB. I am running VB6 sp3 on Win98.
I have a program querying a db.
When constructing a query, I compose it using String fragments like:
Dim SQL As String
...
SQL = SQL & " And PPC.PNO = SPD.PNO "
When I hit 250 char limit, nothing get's appended anymore.
What do I do wrong?
Thanx,
Cristi
-
May 30th, 2000, 08:07 PM
#2
Fanatic Member
Limit? Maybe i am being dumb, as i have not had to write any SQL satements in a while, but where is the 250 character limit comming from?
Iain, thats with an i by the way!
-
May 30th, 2000, 08:28 PM
#3
Thread Starter
New Member
You tell me :-(
I just found that after 250 chars nothing gets appended anymore to the string. No matter how many
SQL = SQL & "blah blah"
I add, I can't get past 250 chars limit.
It doesn't have anything to do with SQL, I may try to compose a recipe for strawberrypie this way (appending small amounts of chars at a time) and still cannot pass over 250 chars limit.
-
May 30th, 2000, 08:39 PM
#4
Fanatic Member
I don't understand. This is just a sample of code to build a 500 cahracter string in small portions.
It seems to work.
Code:
Private Sub Command4_Click()
Dim SQL As String
Dim ictr As Integer
For ictr = 1 To 100
SQL = SQL & String(5, Chr((200 * Rnd) + 55))
Next ictr
MsgBox SQL
End Sub
Iain, thats with an i by the way!
-
May 30th, 2000, 08:47 PM
#5
You're not using a fixed-length string, are you? (From your example it appeared like you were not.)
In other words, this should not give you a problem:
Dim SQL As String
But this would:
Dim SQL As String * 250
With the String * 250, anything you try to append to it after the 250th character would be lost. I can't think of what else might be causing your problem.
"It's cold gin time again ..."
Check out my website here.
-
May 30th, 2000, 09:05 PM
#6
Thread Starter
New Member
Maybe the String gets right.
I try to see it in the Watch window.
Where I can see max 250 chars of it.
Which makes me mad because I want to run my query by hand to see exactly what are the results.
Is there any way to get this info out from VB6 SP3? I don't want a message box :-(
-
May 30th, 2000, 10:51 PM
#7
Fanatic Member
You mean you want to see the query?
Try
This will print the string held in SQL to the immediate window. Hope this is what you are after.
Iain, thats with an i by the way!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|