boris
Posts: 14
|
| Posted: 08/03/2004, 7:05 PM |
|
OK, I'm using CCS & ASP and I've read the Help file and searched through the forum but i still can't seem to get my code working.
Essentially all i want to do is get the values of most of the fields of a record in an Access DB. I've got CCDLookup working on one field but i don't think that's the best way to get the value of 20 fields!?!
What i have at the moment in the Page_BeforeShow event is this:-
'Open connection
Dim DBcnLMSystem
Set DBcnLMSystem = New clsDBcnLMSystem
DBcnLMSystem.Open
'Open RS
Dim SQLJoin,rsUser
CCOpenRS rsUser,SQLJoin,DBcnLMSystem,True
'Display Value of Field
Dim mailbody
mailBody = "UserID: " & CCGetValue(rsUser,"UserID")
'Close RS and Connection
Set rsUser = Nothing
DBcnLMSystem.Close
Set DBcnLMSystem = Nothing
I know the connection is Open as i can use CCDLookup and it displays a value but i can't get any values from the recordset. I would appreciate it if anybody could tell me where i'm going wrong?
|
 |
 |
boris
Posts: 14
|
| Posted: 08/03/2004, 7:15 PM |
|
I've just spotted that when i copied the above code i omitted the SQL statement. Needless to say this is what my code is.
The Open RS statement is
'Open RS
Dim SQLJoin, rsUser
SQLJoin = "SELECT JoinDetails.* FROM JoinDetails;"
CCOpenRS rsUser,SQLJoin,DBcnLMSystem,True
I know if i can't even Copy+Paste what hope is there for me? Any replies to still getting it to work are appreciated.
|
 |
 |
Tuong Do
|
| Posted: 08/03/2004, 8:41 PM |
|
Hi Boris,
Change this line
CCOpenRS rsUser,SQLJoin,DBcnLMSystem,True
To
CCOpenRS rsUser, SQLJoin, DBcnLMSystem.Connection , True
"boris" <boris@forum.codecharge> wrote in message
news:641104471a9a87@news.codecharge.com...
> OK, I'm using CCS & ASP and I've read the Help file and searched through
the
> forum but i still can't seem to get my code working.
>
> Essentially all i want to do is get the values of most of the fields of a
> record in an Access DB. I've got CCDLookup working on one field but i
don't
> think that's the best way to get the value of 20 fields!?!
>
> What i have at the moment in the Page_BeforeShow event is this:-
>
> 'Open connection
> Dim DBcnLMSystem
> Set DBcnLMSystem = New clsDBcnLMSystem
> DBcnLMSystem.Open
>
> 'Open RS
> Dim SQLJoin,rsUser
> CCOpenRS rsUser,SQLJoin,DBcnLMSystem,True
>
> 'Display Value of Field
> Dim mailbody
> mailBody = "UserID: " & CCGetValue(rsUser,"UserID")
>
> 'Close RS and Connection
> Set rsUser = Nothing
> DBcnLMSystem.Close
> Set DBcnLMSystem = Nothing
>
>
> I know the connection is Open as i can use CCDLookup and it displays a
value
> but i can't get any values from the recordset. I would appreciate it if
anybody
> could tell me where i'm going wrong?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|