Discussion:
db IV to vfp, MEMO fields & COM Server
(too old to reply)
pjr
2004-08-09 17:09:58 UTC
Permalink
Hello,
I have not programmed in foxpro in 8 years so this might be a dumb question.

I have a dbase 4 fdbf with a dbt Memo file when i run the getxml function
code in the vfp ide,
the "convert memos"dialog box pops up to ask if i want to remove dbase
'soft' carriage returns from memos. whether I choose YES or NO , the code
runs.
When i create an instance of myclass in a .net app, an exception occurs. i
am sure it is because of "convert memos"dialog box interaction.
Is there any way to get rid of this dialog, by using some default setting or
some SET MODE TO Silent. Help!!!!!!!!!!!!
Thanks!

Ultimately i just want to read a db4 file from a dot.net app. i have tried
several odbc oledb options but i failed to make them work with db4 files
that do not have ".dbf" extention, have memo fields and deleted records.
some of these options stop reading records after the first deleted record is
encountered ???

Define Class myclass As Session OlePublic

Function GetXML(thisFile As String)As variant
Set Compatible On Noprompt
Use &thisFile Alias Row
Cursortoxml("row","lcXML",2,2)
Use
Return lcXML

enddefine
Lee Mitchell
2004-08-09 17:48:41 UTC
Permalink
Hi pjr:

Look at the SET COMPATIBLE command with the NOPROMPT clause to prevent the
appearance of the dialog asking to convert the memo field.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by pjr
Hello,
I have not programmed in foxpro in 8 years so this might be a dumb question.
I have a dbase 4 fdbf with a dbt Memo file when i run the getxml function
code in the vfp ide,
the "convert memos"dialog box pops up to ask if i want to remove dbase
'soft' carriage returns from memos. whether I choose YES or NO , the code
runs.
When i create an instance of myclass in a .net app, an exception occurs. i
am sure it is because of "convert memos"dialog box interaction.
Is there any way to get rid of this dialog, by using some default setting or
some SET MODE TO Silent. Help!!!!!!!!!!!!
Thanks!
Ultimately i just want to read a db4 file from a dot.net app. i have tried
several odbc oledb options but i failed to make them work with db4 files
that do not have ".dbf" extention, have memo fields and deleted records.
some of these options stop reading records after the first deleted record is
encountered ???
Define Class myclass As Session OlePublic
Function GetXML(thisFile As String)As variant
Set Compatible On Noprompt
Use &thisFile Alias Row
Cursortoxml("row","lcXML",2,2)
Use
Return lcXML
enddefine
pjr
2004-08-09 18:04:32 UTC
Permalink
thanks Lee,
i already have that in the code below. the set compa only takes care of the
first dialog box, not the <'soft' carriage returns> one. any ideas?
thanks,
pierre
Post by Lee Mitchell
Look at the SET COMPATIBLE command with the NOPROMPT clause to prevent the
appearance of the dialog asking to convert the memo field.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/
*-- VFP8 HAS ARRIVED!! --*
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by pjr
Hello,
I have not programmed in foxpro in 8 years so this might be a dumb
question.
Post by pjr
I have a dbase 4 fdbf with a dbt Memo file when i run the getxml function
code in the vfp ide,
the "convert memos"dialog box pops up to ask if i want to remove dbase
'soft' carriage returns from memos. whether I choose YES or NO , the code
runs.
When i create an instance of myclass in a .net app, an exception occurs. i
am sure it is because of "convert memos"dialog box interaction.
Is there any way to get rid of this dialog, by using some default setting
or
Post by pjr
some SET MODE TO Silent. Help!!!!!!!!!!!!
Thanks!
Ultimately i just want to read a db4 file from a dot.net app. i have tried
several odbc oledb options but i failed to make them work with db4 files
that do not have ".dbf" extention, have memo fields and deleted records.
some of these options stop reading records after the first deleted record
is
Post by pjr
encountered ???
Define Class myclass As Session OlePublic
Function GetXML(thisFile As String)As variant
Set Compatible On Noprompt
Use &thisFile Alias Row
Cursortoxml("row","lcXML",2,2)
Use
Return lcXML
enddefine
Lee Mitchell
2004-08-09 21:17:50 UTC
Permalink
Hi Pierre:

Sorry, I did not notice the SET COMPATIBLE in your code.

I have not tested this idea, but if you change the structure of the table
and use a memo binary field instead of a memo field does this remove the
soft carriage returns?


I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by pjr
thanks Lee,
i already have that in the code below. the set compa only takes care of the
first dialog box, not the <'soft' carriage returns> one. any ideas?
thanks,
pierre
Look at the SET COMPATIBLE command with the NOPROMPT clause to prevent the
appearance of the dialog asking to convert the memo field.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/
*-- VFP8 HAS ARRIVED!! --*
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by pjr
Hello,
I have not programmed in foxpro in 8 years so this might be a dumb
question.
Post by pjr
I have a dbase 4 fdbf with a dbt Memo file when i run the getxml function
code in the vfp ide,
the "convert memos"dialog box pops up to ask if i want to remove dbase
'soft' carriage returns from memos. whether I choose YES or NO , the code
runs.
When i create an instance of myclass in a .net app, an exception occurs. i
am sure it is because of "convert memos"dialog box interaction.
Is there any way to get rid of this dialog, by using some default setting
or
Post by pjr
some SET MODE TO Silent. Help!!!!!!!!!!!!
Thanks!
Ultimately i just want to read a db4 file from a dot.net app. i have tried
several odbc oledb options but i failed to make them work with db4 files
that do not have ".dbf" extention, have memo fields and deleted records.
some of these options stop reading records after the first deleted record
is
Post by pjr
encountered ???
Define Class myclass As Session OlePublic
Function GetXML(thisFile As String)As variant
Set Compatible On Noprompt
Use &thisFile Alias Row
Cursortoxml("row","lcXML",2,2)
Use
Return lcXML
enddefine
Devapriya De Silva
2004-08-10 10:14:10 UTC
Permalink
Pierre,

ALTER TABLE <Your table> ALTER COLUMN <Your column> M NOCPTRANS

Kind Regards,
Devapriya De Silva
Thanks Lee,
How would I do that programmatically?
Post by Lee Mitchell
Sorry, I did not notice the SET COMPATIBLE in your code.
I have not tested this idea, but if you change the structure of the table
and use a memo binary field instead of a memo field does this remove the
soft carriage returns?
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by Lee Mitchell
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/
*-- VFP8 HAS ARRIVED!! --*
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by pjr
thanks Lee,
i already have that in the code below. the set compa only takes care of
the
Post by Lee Mitchell
Post by pjr
first dialog box, not the <'soft' carriage returns> one. any ideas?
thanks,
pierre
Look at the SET COMPATIBLE command with the NOPROMPT clause to prevent
the
Post by Lee Mitchell
Post by pjr
appearance of the dialog asking to convert the memo field.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no
rights.
Post by pjr
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/
*-- VFP8 HAS ARRIVED!! --*
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by pjr
Hello,
I have not programmed in foxpro in 8 years so this might be a dumb
question.
Post by pjr
I have a dbase 4 fdbf with a dbt Memo file when i run the getxml
function
Post by Lee Mitchell
Post by pjr
Post by pjr
code in the vfp ide,
the "convert memos"dialog box pops up to ask if i want to remove dbase
'soft' carriage returns from memos. whether I choose YES or NO , the
code
Post by Lee Mitchell
Post by pjr
Post by pjr
runs.
When i create an instance of myclass in a .net app, an exception
occurs.
Post by Lee Mitchell
i
Post by pjr
Post by pjr
am sure it is because of "convert memos"dialog box interaction.
Is there any way to get rid of this dialog, by using some default
setting
Post by Lee Mitchell
Post by pjr
or
Post by pjr
some SET MODE TO Silent. Help!!!!!!!!!!!!
Thanks!
Ultimately i just want to read a db4 file from a dot.net app. i have
tried
Post by pjr
Post by pjr
several odbc oledb options but i failed to make them work with db4
files
Post by Lee Mitchell
Post by pjr
Post by pjr
that do not have ".dbf" extention, have memo fields and deleted
records.
Post by Lee Mitchell
Post by pjr
Post by pjr
some of these options stop reading records after the first deleted
record
Post by Lee Mitchell
Post by pjr
is
Post by pjr
encountered ???
Define Class myclass As Session OlePublic
Function GetXML(thisFile As String)As variant
Set Compatible On Noprompt
Use &thisFile Alias Row
Cursortoxml("row","lcXML",2,2)
Use
Return lcXML
enddefine
Loading...