|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by luca2009 in Interbase / Firebird Database, VB Database Programming
This is an arranged code , sorry for that...
Butr i want to lopp all recordset MATR in Table STAFF
until this line:
CN1.BeginTrans
i have testted variuos solution but not have a good result..
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
|
Sub sample1()
Dim CN1 As ADODB.Connection
Dim RS1 As ADODB.Recordset, SQL As String
Dim Cmd
Dim Row
Set RS1 = New ADODB.Recordset
Set CN1 = New ADODB.Connection
CN1.Provider = "LCPI.IBProvider.2"
CN1.Open "data source=localhost:C:\Programmi\Firebird\ESEMPIO_DB\RUBRICA.FDB;ctype=win1251", "sysdba", "masterkey"
SQL = "SELECT DISTINCT MATR FROM STAFF"
'CN1.Execute SQL
'RS1.Open SQL, CN1, adOpenKeyset, adLockOptimistic
CN1.BeginTrans
Cmd.ActiveConnection = CN1
Cmd.CommandText = "select full_name from employee order by emp_no"
Set Row = Cmd.Execute
While Not Row.EOF
Debug.Print CStr(Row(0)) & "<br>"
Row.MoveNext
Wend
Conn.CommitTrans
End Sub
|
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625