Hello!! I´m write from Spain because I have a little problem with Pervasive. This is actual code from my program:
Private Sub Command2_Click()
Set base = OpenDatabase("ejemplo3", False, False, "ODBC; DSN=basedatos"
Set Tabla = base!tabla1
If Tabla.Indexes.Count = 0 Then
etiqueta.Caption = "WITHOUT INDEX"
Exit Sub
End If
For i = 0 To Tabla.Indexes.Count - 1
etiqueta.Caption = etiqueta.Caption & vbCrLf & "indice: " & UCase(Tabla.Indexes(i).Name) & vbCrLf & "campos: " & vbCrLf
cadena = Trim(Tabla.Indexes(i).Fields)
tamaño = Len(cadena)
posicion = 1
While posicion <= tamaño
pos = InStr(posicion, cadena, ";"
If pos <> 0 Then
palabra = Mid(cadena, posicion, pos - posicion)
If palabra <> "" Then
palabra = Mid(palabra, 2, Len(palabra))
etiqueta.Caption = etiqueta.Caption & palabra & vbCrLf
End If
posicion = pos + 1
Else
etiqueta.Caption = etiqueta.Caption & Mid(cadena, posicion + 1)
posicion = tamaño + 1
End If
Wend
Next
End Sub
It´s a ODBC conection between Vbasic 6.0 and Pervasive but I need the same with Pervasive´s MicroKernel. How can I get it??
Now I conect Vbasic and Pervasive´s Microkernel with this sentence:
Dim cnn As New Connection
cnn.Open "Provider=PervasiveOLEDB; Data source=basedatos"
but I can´t read indexes properties like previous example.
I need the same thing that in the first example with the second conection. THANKS!!
Private Sub Command2_Click()
Set base = OpenDatabase("ejemplo3", False, False, "ODBC; DSN=basedatos"
Set Tabla = base!tabla1
If Tabla.Indexes.Count = 0 Then
etiqueta.Caption = "WITHOUT INDEX"
Exit Sub
End If
For i = 0 To Tabla.Indexes.Count - 1
etiqueta.Caption = etiqueta.Caption & vbCrLf & "indice: " & UCase(Tabla.Indexes(i).Name) & vbCrLf & "campos: " & vbCrLf
cadena = Trim(Tabla.Indexes(i).Fields)
tamaño = Len(cadena)
posicion = 1
While posicion <= tamaño
pos = InStr(posicion, cadena, ";"
If pos <> 0 Then
palabra = Mid(cadena, posicion, pos - posicion)
If palabra <> "" Then
palabra = Mid(palabra, 2, Len(palabra))
etiqueta.Caption = etiqueta.Caption & palabra & vbCrLf
End If
posicion = pos + 1
Else
etiqueta.Caption = etiqueta.Caption & Mid(cadena, posicion + 1)
posicion = tamaño + 1
End If
Wend
Next
End Sub
It´s a ODBC conection between Vbasic 6.0 and Pervasive but I need the same with Pervasive´s MicroKernel. How can I get it??
Now I conect Vbasic and Pervasive´s Microkernel with this sentence:
Dim cnn As New Connection
cnn.Open "Provider=PervasiveOLEDB; Data source=basedatos"
but I can´t read indexes properties like previous example.
I need the same thing that in the first example with the second conection. THANKS!!