Visual Basic - coneccion con visual fospro

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

coneccion con visual fospro

Publicado por sergio flores (3 intervenciones) el 13/03/2003 00:01:22

HOLA!!
HE LEIDO VUESTRO EMAIL Y APELO A VUESTRA EXPERIENCIA ENTRE FOX Y VISUAL BASIC
ESTOY CONFECCIONADO UN PROGRAMA EN VISUAL Y DEBO CONECTARME A VISUAL FOX. LA CONECCION FUNCIONA DENTRO DE UN SOLO DIRECTORIO PERO NO SE COMO HACERLO PARA TABLAS QUE ESTAN EN DIFERENTES DIRECTORIOS ESPERO VUESTRA AYUDA

SIN OTRO PARTICULAR

SERGIO FLORES FLORES
TE AJDUNTO UN EJEMPLO.
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
mirut = Val(Text1.Text)
If Val(Text1.Text) < 0 Then
mens = MsgBox("Debe ingresar Rut de Empresa ", vbOKOnly, "Error")
Text1.SetFocus
Else
Dim cnfox As ADODB.Connection, rsfox As ADODB.Recordset
'abro la base de datos de fox
Set cnfox = New ADODB.Connection
cnfox.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=Driver={Microsoft Visual FoxPro Driver};UID=;SourceDB=" & App.Path & "\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
cnfox.Open
'abro el recordset de fox
Set rsfox = New ADODB.Recordset
rsfox.CursorLocation = adUseClient
'me aseguro de que esté vacío, para ahorrar tiempo
rsfox.Open "select * from maeprov where prorut = " & mirut & "", cnfox, adOpenKeyset, adLockOptimistic
Call limpia
...

Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Algunas formas encontradas

Publicado por Esteban (1144 intervenciones) el 13/03/2003 02:44:52
oConn.Open "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBC;" & _
"SourceDB=c:\somepath\mySourceDb.dbc;" & _
"Exclusive=No"

oConn.Open "Driver={Microsoft Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
"SourceDB=c:\somepath\mySourceDbFolder;" & _
"Exclusive=No"
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar