|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Jun 2001
Città: Catania
Messaggi: 2696
|
[VB2010] - Errore connessione Access
Salve ragazzi,
cos'è che mi crea l'errore in questa sub che gira nell'evento Form_Load di un form? Vedi immagine sotto il codice... Codice:
Private Sub VerificaRegistrazione(ByVal DB As String, ByVal TB As String, ByVal MySeriale As String, ByVal MyForm As Form)
Dim StrCnn As String
Dim StrSql As String
CnnReg = New ADODB.Connection
RstReg = New ADODB.Recordset
Tabella = TB
StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Application.StartupPath & _
"\" & DB & ";Jet OLEDB:Database Password=pass"
CnnReg.Open(StrCnn)
StrSql = "SELECT * FROM " & TB & " WHERE NumeroSeriale = '" & MySeriale & "'"
RstReg.CursorType = ADODB.CursorTypeEnum.adOpenStatic
RstReg.CursorLocation = ADODB.CursorLocationEnum.adUseClient
RstReg.Open(StrSql, CnnReg)
If RstReg.RecordCount > 0 Then
Me.Hide()
Else
MyForm.Show()
End If
End Sub
![]() Grazie!
__________________
Unisciti a noi: http://www.swproduction.altervista.org/ - http://www.enews.altervista.org/
|
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Jun 2001
Città: Catania
Messaggi: 2696
|
...l'errore è quì:
se utilizzo questa Source per il Recordset Codice:
StrSql = "SELECT * FROM " & TB Codice:
StrSql = "SELECT * FROM " & TB & " WHERE NumeroSeriale = '" & MySeriale
__________________
Unisciti a noi: http://www.swproduction.altervista.org/ - http://www.enews.altervista.org/
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 17:20.




















