This may seem a little odd but I have a program that each day collects between three and five payment files and sends them to an AS/400 where they are processed and submitted to a third party. For some reason the AS/400 program looks at the four digit (hhmm) file creation time in the file...
Thanks, Golom. I should have seen that. Split and Join, now that you said it I could kick myself for missing it. As for the "0 to UBound", yes, that is what I wanted.
Brad
Thanks for all the tips. Here is what I ended up doing . . .
strOutput = ""
strArray = Split(strInput, "|")
For i = 0 To 9
If i = 9 Then
strArray(i) = strArray(i) / 100
End If
Next
strOutput = strArray(0)...
I have 30 pipe delimited files that are 40 columns wide. Together they contain over 27,000 records. I need to devide the value in the 10th column by 100. I know that I can use InStr to find the position of the first occurance of a character in a line. What can I use to find the 9th or 10th...
Thanks, Hypetia! That did the trick.
So if I understand correctly, the relation of the strSelectString variable to the explicit Case specification is loosely analagous to the relation of a scanned image file of a printed text document to the original text file. It is a representation that looks...
Nope. It's VB6. I used File System Objects when I wrote this just to do something different.
I did another set of debug.print captures. Trim(strRecordType) is not quoted. In strSelectString the individual comma-separated elements are either quoted or not, as you would expect, depending on...
Ok. So I had the bright idea that I would put my matching strings in a text file and read them in when the process runs. That way if the list changes I don't need to open the code to change it. My original Case line looks like this:
Case "String1", "String2", "String3", "String4"...
Is there any way in VB6 to simplify a long series of If-Then operations
If String1 = String2 Or _
If String1 = String3 . . . Then
by doing something like a SQL query
IF String1 IN (String2, String3 . . .)
Sorry I took so long to acknowledge your replies. Once we realized that the problem was essentially a Windows limitation (for which I have strongm to thank) we took Tom's suggestion. My boss modified the import program to run in a desktop icon analog and launch from the Startup folder.
Stars to...
Strongm, I think you may have hit the nail on the head.
Tom, We are dragging the files from an Explorer window on to my program's desktop icon. The OS is XP Pro (32 bit). The first line of code in my program is an 'On Error Goto Error_Handler' statement but it appears that the error is...
I am working on a VB6 Sp6 program to act as a parser, passing the paths and file names of a group of files dropped on its desktop icon as a delimited string to the import utility of a document management system. When I drop a group of files on the program icon it launches the program, which...
I have a stored procedure that creates and populates a work table then performs a sequence of operations on the records represented in the work table. At the end of the sp I would like to send the contents of the work table to my users via email. I know that email is set up and working on the...
Markros,
Thanks for the links. I will check them out.
George,
I can add or change indexes but it will have to wait until tomorrow at this point.
Thank you both for your help. This is my idea of a good time.
Brad
George,
I'm in the process of vaildating that the records returned are truly the latest for each account but I can say that there are no multiple returns for any one account, which was a problem with my query. The performance is identical to the original query if the sort is on the DateChanged...
George,
Wow! It took me a while to start getting a handle on what your query does and I still haven't grasped it completely. I think I get that the sub-query creates a (recordset?), where I would have used a temp table (if I had the knowledge to do it at all, which I don't). The stacked (or...
George,
Thank you for that concise explanation, both about the reasons why one is better than the other and about my use of MAX.
Do you have any suggestions as to how to get the results I'm looking for?
Makros, thank you for the reply.
Rudy, thank you too.
I was able to determine that my attempt to return just the newest status change for each account using MAX(DateChanged) doesn't work. Does anyoone have any suggestions?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.