to is use the cfquery tag. It seems like this would do what you're wanting:
<cfset username = "dadada">
<cfset password = "aaaaa">
>> > ConnectString = "DEV"
>> > UID = Username & "/" & Password
These should be set in your CF Datasource, then you just use:
<cfset mydsn = "thenameofthedesnsetincfadmin">
Then:
<cfquery name="#username#" password="#password#" datasource="#mydsn#">
SELECT description
FROM news
WHERE complete = 'N'
AND start_date >=sysdate
</cfquery>
----- Original Message -----
From: "Brian Yager" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 12, 2004 7:36 AM
Subject: Re:Problems talking with Oracle...
> This is the piece of code that I am having a hard time writing in CF.
Basically, I am wanting to create the object so I can use it and it's
methods...There is a lot more code then what I have listed...This is just
the code that creates it.
>
> Thanks,
>
> Brian
>
>
> >It doesn't look to me like that's telling you anything about a username.
It
> >looks like it's just opening a connection and running a pretty standard
> >query. Are you sure you're looking at the right piece of code?
> >
> >-Deanna
> >
> >----- Original Message -----
> >From: "Brian Yager" <[EMAIL PROTECTED]>
> >To: "CF-Talk" <[EMAIL PROTECTED]>
> >Sent: Wednesday, February 11, 2004 3:12 PM
> >Subject: Re:Problems talking with Oracle...
> >
> >
> >> Anyone?
> >>
> >>
> >>
> >> > Hello...I am needing to talk to the Oracle object to see if a
username
> >> > is valid, password is expired or in the grace period. I have some
ASP
> >> > code that I am having problems converting to CF. Here is what they
> >> > had...
> >> >
> >> >
> >> > OBJECT RUNAT=Server
> >>
> >> > SCOPE=Application
> >>
> >> > ID=OraSession
> >>
> >> > PROGID="OracleInProcServer.XOraSession">
> >> > /OBJECT>
> >> >
> >> >
> >> > and
> >> >
> >> >
> >> >
> >> >
> >> > Dim OraErr
> >> >
> >> > 'On Error Resume Next
> >> >
> >> > Username = "dadada"
> >> > Password = "aaaaa"
> >> > ConnectString = "DEV"
> >> > UID = Username & "/" & Password
> >> >
> >> > Set OraDatabase = OraSession.OpenDatabase(ConnectString,UID,Cint(0))
> >> >
> >> > OraDB_OK = OraDatabase.ConnectionOK
> >> >
> >> > v_count = 0
> >> > If OraDB_OK Then
> >> >
> >>
> >> > vSQL = "SELECT DESCRIPTION " & _
> >>
> >> > "FROM NEWS " & _
> >>
> >> > "WHERE COMPLETE='N' " & _
> >>
> >> > "OR START_DATE >= SYSDATE " & _
> >>
> >> > "ORDER BY START_DATE"
> >>
> >> >
> >>
> >> > Set OraDynaSet = OraDatabase.DbCreateDynaSet( vSQL, Cint(0))
> >>
> >> > Do While (OraDynaSet.EOF = False)
> >>
> >> > v_count = v_count + 1
> >>
> >> > Response.Write("<tr><td align=left bgcolor=#CDCDCD height=30><font
> >> > color=black>")
> >>
> >> > Response.Write (OraDynaset.Fields("DESCRIPTION") )
> >>
> >> > Response.Write ("</font></td></tr>")
> >>
> >> > OraDynaset.MoveNext
> >>
> >> > Loop
> >>
> >> > If v_count = 0 Then
> >>
> >> > Response.Write("<tr><td align=left bgcolor=#CDCDCD height=30><font
> >> > color=black>There is no news at this time</font></td></tr>")
> >>
> >> > End If
> >> > Else
> >>
> >> > Response.Write("<tr><td align=left bgcolor=#CDCDCD height=30><font
> >> > color=black>There was a problem getting news</font></td></tr>")
> >> > End If
> >> >
> >> > OraDatabase.Close
> >> >
> >> >
> >> > Thanks all!
> >> >
> >> >
> >> > Brian Yager
> >> > President - North Alabama
> >> > Cold Fusion Users Group
> >> > http://www.nacfug.com
> >> > GMD-JPO OCD IT
> >> > Computer Scientist - Contractor CSC
> >> > (256)313-9668
> >> > [EMAIL PROTECTED]
> >> mil
> >>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

