[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.

Question
[x]
Attachment Details

LOOPING recorset with FDB database

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
[+][-]10/20/09 09:29 AM, ID: 25615777Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/20/09 09:33 AM, ID: 25615819Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/20/09 09:35 AM, ID: 25615831Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/20/09 11:11 PM, ID: 25621125Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/17/09 12:49 PM, ID: 25843970Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11/20/09 07:50 AM, ID: 25871432Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625