Página 8 de 9

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 14:33
por marge0512
Hi! I still get the same error.

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 14:56
por Pablo César
Could you give us the complete message error ? Mismatch ? Which one ?

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 15:01
por marge0512
Sure, it says:

Error type: MISCELLANEOUS
Application: CASES
Procedure: CO_FND
Line: 0
Description: TYPE MISMATCH
Source: ->

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 15:11
por Pablo César
What I remember "Type Mismatch" is when you try to concatenate a string with other kind of type.
For exemple: "TEXT"+123 or "TEST"+.T.

Why you are making this:
cString = Left(cString, (Len(cString) - 1)) + "_"

There is nay other attribution to cString ?

before this line of error, put ALERT(cString) just to see it value. And revert.

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 16:14
por marge0512
It does seem to not like the path and string together even though cString is bringing back the correct value. I think I am going to go back to Harbour for now because I have a few more things I would like to change for this project and worry about Summer87 later.

Changing to Harbour will be my future project, but for now, I must try and fix this. Thank you!

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 16:23
por alxsts
Hi!

Are having this problem with that Summer' 87 application? Wasn't it running fine? Or is it a test of that app in Harbour?

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 16:27
por marge0512
Hi! It was the test in Harbour that worked fine. I was using the Harbour version because I can debug in Harbour but not Summer87. Then, I decided to try it in 87 to see what would happen. That's when i got the error. It worked fine in Harbour. When it is all said and done, I have to compile the project for the user in 87 because I cannot in Harbour.

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 16:58
por alxsts
Hi!

Understood. Please, place two lines before the offending one like below. These lines will show the contents of concatenated strings in bottom row of screen (I 'm checking IndexExt() function return too). Let us know what it will show. Maybe one of the strings contains a NIL (Clipper NULL) value.

Código: Selecionar todos

cString = Left(cString, (Len(cString) - 1)) + "_"

SELECT 0

@ 24, 0 SAY cPath + cString + IndexExt()  && add this line...

Inkey(0)                                                  && ... and this

CREATE (cPath + cString) <----------------------Point of error.

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 17:54
por Pablo César
I think you are right Alexandre !
The poroblem is the return of IndexExt(), which in this case is NIL and NIL can not be concatened with one string.
Congrats !

How to SCAN substrings in a dbf - Summer 87

Enviado: 07 Fev 2013 18:43
por alxsts
Well, I'm not sure IndexExt() is NIL. IndexExt() function appears in S'87 Norton Guides. Don't know if it works. That's what I wanna check.

Used @...SAY because S'87 doesn't support Alert() function.

How to SCAN substrings in a dbf - Summer 87

Enviado: 11 Fev 2013 18:49
por marge0512
Hello, and I'm sorry I'm just getting back to this..........

I added those 2 lines and when my system asks for what to search I put in "Inc", then i hit enter. I get this response: C:\tmpTable_.ntx
Then, I get the mismatch error when i hit enter again.

How to SCAN substrings in a dbf - Summer 87

Enviado: 11 Fev 2013 19:24
por alxsts
Hi Marge.

I think the problem is the underline character (_). Try to replace it with another. Maybe a digit or an alpha between a...z. Mayme S'87 does not accept "_".

How to SCAN substrings in a dbf - Summer 87

Enviado: 11 Fev 2013 19:31
por marge0512
Hi! Well, I tried replacing the "_'" with a number and I tried a different name but it still gives the same error. I am confused about something though.....I thought the CREATE command creates a .dbf not an .ntx???

How to SCAN substrings in a dbf - Summer 87

Enviado: 11 Fev 2013 19:46
por alxsts
Well, the Create command should create a DBF file. Can't understand what is going on...

I'll install VirtualBox and Summer 87 in my home machine so I can watch it "in loco" See you tomorrow.

How to SCAN substrings in a dbf - Summer 87

Enviado: 12 Fev 2013 13:42
por marge0512
Thank you! I looked in my C:\ and there are two tables being created each time with a .dbf extension. Nothing is being created with the .ntx extension. Is this a good thing?

I am now thinking that the line of coding that I thought was the point of error is not. Since I cannot debug in Summer87 to find the exact line and everything is working fine in Harbour, I am trying to do "process of elimination" to find the point of error. Since both tables are being created, I don't think it is this line anymore.........CREATE (cPath + cString).

When i look into the tables (I have to open them in Excel. I don't have dBase on my computer), the first one stores the field_name, type, etc for COMPNY_NAM and CASE_LNAME. The other table (tmpTable.dbf) has one field showing COMPNY_NAM and the field next to it as CASE_LNAME. But that is all. There are no rows in the table. I think that is where I need to look for the mismatch error??? I will post when I find it.