Forum Replies Created
-
AuthorPosts
-
peterlaursenParticipant
I can reproduce some stablity issues with the horizontal scrollbar.
The funny thing is that a “select *… ” seems to be stable but there are problems with a “select (long_fieldlist)….”
peterlaursenParticipantHow goes ??? 🙂
Did it help you to write
QUOTE IF rstRecordset.EOF rstRecordset!FillFields = ifld
ENDIF
instead of just
QUOTE rstRecordset!FillFields = ifld I still believe that would be a solution since that wil only change the value of the last data in the array.
Then you can safely write back the whole array to the base.
But still I don't understand why the “rstRecordset!FillFields = ifld” must be inside the loop.
That meaans that you will write to the base 32 times.
That would make the routine 32 * slower tha just writing once!
peterlaursenParticipantand you don't try to import a table that already exists ? (a remnant from your first successfull attempt ?)
That would be a logical explanation for the “dublicate column” error !
Did you save the job file ?? Check if there is a “drop table if exists” for the tables. I believe there isn't ?
peterlaursenParticipantThere has been proposed some changes/enhances to the BLOB-viewer function in this forum recently, especially
1) In case BLOB-data are neither image data or text but just plain binary data (could be communication strings, proces data etc) it should be possible to display them in “binary view and “hex view” – somewhat like simple Hex-editors like
Ultraedit and Textpad.
2) A option to launch an external program (as ecternal viewer or as a plugin) in case the BLOB-viewer doesnt recognize the data. I myself proposed that the GNU GTK Graphics library (used for the GIMP) could be used as a plugin.
However do you want a “longtext” field to display on the screen at first sight of “view data”. I'm afraid I'll need to get myself a MUCH wider screen then 😀 . But maybe I just didn't get your point ?
BTW – I believe that it is actually wrong when Sqlyog calls text” for “BLOB” – it is not BLOB (Binary Long OBject) but CLOB (Character Long OBject) what is in MySQL implemented as/called “text”
peterlaursenParticipanttry again
something like
Do While Not rstRecordset.EOF
..
ifld = ifld + 1
..
if EOF rstRecordset.EOF rstRecordset!FillFields = ifld // 'twas what I meant.
else **do nothing**
..
loop
REALLY GOOT TO GO NOW!
peterlaursenParticipantthen I think it comes down to basic programming teqnique.
something like
Do While Not rstRecordset.EOF
..
ifld = ifld + 1
..
if EOF rstRecordset!FillFields = ifld
else **do nothing**
..
loop
peterlaursenParticipantOr rather
rstRecordset.Open “Select * from DailyQCRed”, cn, adOpenDynamic, adLockPessimistic
Do While Not rstRecordset.EOF
ifld = 0
For i = 4 To 40
If i < 34 Or i > 37 Then
If rstRecordset.Fields(i).Value <> “” Then
ifld = ifld + 1
End If
End If
Next i
rstRecordset.MoveNext
Loop
rstRecordset!FillFields = ifld
rstRecordset.Update (with appropriate SQL)
rstRecordset.Close
peterlaursenParticipantIsn't there any other way to identfy the correct row in DB/Table DailyQCRed other them “in the last field of the table DailyQCRed” . An key/index or a timestamp or anything that you can use in the WHERE clause
Besides I think this statement “rstRecordset!FillFields = ifld” could be put after the loop.
Like
rstRecordset.Open “Select * from DailyQCRed”, cn, adOpenDynamic, adLockPessimistic
Do While Not rstRecordset.EOF
ifld = 0
For i = 4 To 40
If i < 34 Or i > 37 Then
If rstRecordset.Fields(i).Value <> “” Then
ifld = ifld + 1
End If
End If
Next i
Loop
rstRecordset!FillFields = ifld
rstRecordset.Update (with appropriate SQL)
rstRecordset.MoveNext
rstRecordset.Close
.. then only the last one is changed as far as i can se. But that is my last word in this conversation because
first I have to go now, second I'm not a coding expert at all.
peterlaursenParticipantthe syntax for update is (very basically)
UPDATE tbl_name SET col_name1=expr1, [ col_name2=expr2, … ] [ WHERE where_definition ]
But what is going to happen with the calculated value. Should it be written back to the database somewhere or what ever ??
If not just 'output it' somehow! and delete the line “rstRecordset.Update” if there shall be no update to the database. You write
QUOTE The purpose of this code is to calculate the number of non empty fields in the table DailyQCRed from columns 4 to 40 ignoring in between columns 34 to 37. if the calculated value is “7” what shall you do with that “7” ?? You have already been able to output it to a messagebox.
peterlaursenParticipantYou write “and the database is SQL Yog”.
Well … sqlyog is not a database. Sqlyig is a Client for MySQL (that is a database server). And I don't think this problem has anything to do with sqlyog at all. It' a pure MySQL/VB interface interface problem.
But undoubtedly your calculation is correct. And your SELECT statment works too.
so it must be this code
rstRecordset!FillFields = ifld
rstRecordset.Update
rstRecordset.MoveNext
that is not the correct syntax to write to a MySQL database from VB.
Don't you think that the “rstRecordset.Update” should have a SQL-string as parameter ? That would be my guess …
But it's about 8 years ago I sniffed a little to VB …
peterlaursenParticipant>> CalEvans
I'm happy with the “innodb_file_per_table” -option !
peterlaursenParticipantNo ideas …. 😎
You wrote it yourself. Tunnelling is not included with the free version of Sqlyog.
If you can't connect directly to the MySQL port (normally 3306) you must use the Enterprise version.
peterlaursenParticipantcorrection
however 'sja.exe Y job.xml' and 'sja.exe Y job.xml' both execute perfectly …
>>>
owever 'sja.exe Y job.xml' and 'sja.exe N job.xml' both execute perfectly
peterlaursenParticipantOK ritesh.
However 'sja.exe Y job.xml' and 'sja.exe Y job.xml' both execute perfectly her with 4.0 RC (never could afford bying a newer!)
When the helpfile says “.. that accepts a Job Definition file encoded in XML as one of the parameters.” – what are then the parameterSSSSSSSSSS ??? 😛
Or has it just changed since then ?
peterlaursenParticipantI just want to add that is acceptable that I'm one minute later than Ritesh, since I wrote so many more words …
-
AuthorPosts