Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
neia
 
Posts: n/a
Default mala direta com arquivo dbf

Tenho um arquivo gerado pelo Visual FoxPro 6.0. Ao tentar criar uma mala
direta utilizando-o e confirmando a fonte de dados como "arquivos foxpro"
recebo as mensagens: "Unable do load ole32.dll" e "Falha de sqllochandle do
driver sql_handle-env".
Entrei no Painel de controle para tentar configurar o driver mas ele manda a
mesma mensagem "Unable do load ole32.dll" e não me deixa fazer nada.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default mala direta com arquivo dbf

I am sorry I cannot write Portuguese, but...
....Can you open your FoxPro data source using Excel

Peter Jamieson
"neia" wrote in message
...
Tenho um arquivo gerado pelo Visual FoxPro 6.0. Ao tentar criar uma mala
direta utilizando-o e confirmando a fonte de dados como "arquivos foxpro"
recebo as mensagens: "Unable do load ole32.dll" e "Falha de sqllochandle
do
driver sql_handle-env".
Entrei no Painel de controle para tentar configurar o driver mas ele manda
a
mesma mensagem "Unable do load ole32.dll" e no me deixa fazer nada.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
neia
 
Posts: n/a
Default mala direta com arquivo dbf

Yes. I don´t have problem with excel.
However, I would like use FoxPro with Word, using mailmerge class.

"Peter Jamieson" escreveu:

I am sorry I cannot write Portuguese, but...
....Can you open your FoxPro data source using Excel

Peter Jamieson
"neia" wrote in message
...
Tenho um arquivo gerado pelo Visual FoxPro 6.0. Ao tentar criar uma mala
direta utilizando-o e confirmando a fonte de dados como "arquivos foxpro"
recebo as mensagens: "Unable do load ole32.dll" e "Falha de sqllochandle
do
driver sql_handle-env".
Entrei no Painel de controle para tentar configurar o driver mas ele manda
a
mesma mensagem "Unable do load ole32.dll" e não me deixa fazer nada.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default mala direta com arquivo dbf

Sorry it has taken a while to get back to you on this.

I do not know what is going wrong where you are, but here the following
things worked, using Word 2003 and
a. the Visual FoxPro ODBC driver called "Microsoft Visual FoxPro Driver"
version 6.01.8629.01 (it also has a Portuguese name, "Driver para o
Microsoft Visual FoxPro")
b. the visual FoxPro OLEDB Provider version

Let's assume you have a folder called c:\fp containing a .dbc called db.dbc
and some .dbf files associated with the .dbc, including one called t.dbf

Then you should be able to connect in the following ways (at least):

Using ODBC to connect
-----------------------------------
Create an ODBC User or System DSN called fox.It doesn't matter whether you
set it up for a DBC or DBFs

For a DBC, use the following OpenDataSource call (sorry, you will need to
fix the line wrapping):

ActiveDocument.MailMerge.OpenDataSource _
Name:="", _
Connection:="DSN=fox;UID=;PWD=;SourceDB=C:\fp;Sour ceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collat e=Machine;Null=Yes;Deleted=Yes;",
_
SQLStatement:="SELECT * FROM `t`", _
SubType:=wdMergeSubTypeWord2000

For a DBF, use the following OpenDataSource call:

ActiveDocument.MailMerge.OpenDataSource _
Name:="", _
Connection:="DSN=fox;UID=;PWD=;SourceDB=C:\fp\db.d bc;SourceType=DBC;Exclusive=No;BackgroundFetch=Yes ;Collate=Machine;Null=Yes;Deleted=Yes;",
_
SQLStatement:="SELECT * FROM `t`", _
SubType:=wdMergeSubTypeWord2000

Using OLEDB to connect
--------------------------

I am fairly sure that you cannot specify the .dbc or .dbf in the Name
parameter. I think you have to have a .udl or .odc file. These are just
plain text files that are supposed to provide connection details. However,
as far as I know either type of file can be an empty text file that you can
create in Notepad. Let's suppose you have such a file called c:\fp\fox.udl

Then try:

ActiveDocument.MailMerge.OpenDataSource _
Name:="c:\fp\fox.udl", _
Connection:="Provider=VFPOLEDB.1;Data Source=c:\fp\db.dbc;Mode=Share
Deny None;User ID="""";Password="""";", _
SQLStatement:="SELECT * FROM `t`"

or:

ActiveDocument.MailMerge.OpenDataSource _
Name:="c:\fp\fox.udl", _
Connection:="Provider=VFPOLEDB.1;Data Source=c:\fp;Mode=Share Deny
None;User ID="""";Password="""";", _
SQLStatement:="SELECT * FROM `t`"


If you want the user to be able to select the dbf, given a folder or dbc, I
suspect it is possible using a .odc, but ask again. (I will not be back for
a few days).

Peter Jamieson

To connect to a dbf, try


"neia" wrote in message
...
Yes. I dont have problem with excel.
However, I would like use FoxPro with Word, using mailmerge class.

"Peter Jamieson" escreveu:

I am sorry I cannot write Portuguese, but...
....Can you open your FoxPro data source using Excel

Peter Jamieson
"neia" wrote in message
...
Tenho um arquivo gerado pelo Visual FoxPro 6.0. Ao tentar criar uma
mala
direta utilizando-o e confirmando a fonte de dados como "arquivos
foxpro"
recebo as mensagens: "Unable do load ole32.dll" e "Falha de
sqllochandle
do
driver sql_handle-env".
Entrei no Painel de controle para tentar configurar o driver mas ele
manda
a
mesma mensagem "Unable do load ole32.dll" e no me deixa fazer nada.






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
arquivo pdf MRSO Microsoft Word Help 1 November 16th 05 09:13 PM


All times are GMT +1. The time now is 01:52 PM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"