f



How to get the value from a text filed ?

Hi all,
I want to ask
how can i get  the value in a text field and save to database.
My database is Oracle 9i and using Louts Domino 7.

THx a lot
Match

0
matchsin
2/17/2006 7:57:04 AM
comp.lotus-notes.programmer 2966 articles. 0 followers. Post Follow

3 Replies
404 Views

Similar Articles

[PageSpeed] 26

That's kind of a vague question....
What language? @Formula, LS, Java ?

You want to store a textfield from a NotesDocument to a Record in your 
oracle 9i db?


matchsin@gmail.com schrieb:
> Hi all,
> I want to ask
> how can i get  the value in a text field and save to database.
> My database is Oracle 9i and using Louts Domino 7.
> 
> THx a lot
> Match
> 
0
urs
2/17/2006 9:02:25 AM
Yes......

I am using loutsscript...

this is my coding of the agent


Dim qry As New ODBCQuery
	Dim rs As New ODBCResultSet
	Dim odbc As New  ODBCConnection

	Dim ename As String
	Dim pwd As String
	Dim dsn As String

	Dim sess As New NotesSession
	Dim doc As   NotesDocument
	Set doc = sess.DocumentContext

	dsn= "xxxxxx"
	ename= "xxxxx"
	pwd = "xxxxx"

	qry.SQL=" insert into ABC values ( ' "+doc.GetItemValue
("field1")(0)+" ' )"

	Set qry.Connection  = odbc
	Set rs.Query =qry
	If odbc.ConnectTo (dsn,ename,pwd) Then
		rs.Execute
		Print "OK la"
	Else
		Print "Cannot get result set"
	End If
	odbc.Disconnect

0
matchsin
2/17/2006 9:13:40 AM
Assuming your only have one value, try the bit I've put below.

Alex

matchsin@gmail.com wrote:
> Yes......
> 
> I am using loutsscript...
> 
> this is my coding of the agent
> 
> 
> Dim qry As New ODBCQuery
> 	Dim rs As New ODBCResultSet
> 	Dim odbc As New  ODBCConnection
> 
> 	Dim ename As String
> 	Dim pwd As String
> 	Dim dsn As String
> 
> 	Dim sess As New NotesSession
> 	Dim doc As   NotesDocument
> 	Set doc = sess.DocumentContext
> 
> 	dsn= "xxxxxx"
> 	ename= "xxxxx"
> 	pwd = "xxxxx"
> 
> 	qry.SQL=" insert into ABC values ( ' "+doc.GetItemValue
> ("field1")(0)+" ' )"

qry.SQL = insert into ABC values (' " + doc.Namefield(0) + " ')"


> 
> 	Set qry.Connection  = odbc
> 	Set rs.Query =qry
> 	If odbc.ConnectTo (dsn,ename,pwd) Then
> 		rs.Execute
> 		Print "OK la"
> 	Else
> 		Print "Cannot get result set"
> 	End If
> 	odbc.Disconnect
> 
0
Alex
2/21/2006 3:45:57 AM
Reply: