|
-
Dec 22nd, 1999, 01:36 AM
#1
Hello;
I'm Khamal, my condition :-
1. I'm using oracle 8.0.5 both for client and server
2. I had create the database on client pc and communication was greate, now
i'm able to add the new data using MSRDC(Microsoft Remote Data Control 6.0)
3. My server running on windows NT SP3
4. Client running smoothly on windows98
5. My table do have field: (name, address, telephoneno)
My question is
1. I had problem in quering field to text box
My command:
*********************************************
Private Sub Text2_LostFocus()
Dim ssql As String
With MSRDC1
ssql = "select * from contoh1 where name= & Text2.Text &"
.SQL = ssql
.CursorDriver = rdUseClientBatch
.LockType = rdConcurRowVer
.ResultsetType = rdOpenStatic
End With
Text1.DataField = "address" -error message appear
Text3.DataField = "telephoneno"
End sub
*********************************************
should you have any suggestion please email me at [email protected].
Thank you
------------------
Khamal
-
Dec 22nd, 1999, 02:44 AM
#2
Guru
Change this line:
ssql = "select * from contoh1 where name= & Text2.Text &"
To:
ssql = "Select * from contoh1 where name = '" & text2.text & "'"
=====================================
I'm not sure if you need the single quotes when querying an Oracle text field (I would think so....)
Tom
-
Dec 22nd, 1999, 02:46 AM
#3
Guru
If that does not solve your problem, please post the error message, thx
-
Dec 22nd, 1999, 04:37 AM
#4
Addicted Member
Try it:
------------------------
Dim rdoCn As New rdoConnection
With rdoCn
.Connect = "DSN=oracle8;UID=user;PWD=pass;"
.LoginTimeout = 25
.CursorDriver = rdUseOdbc
.EstablishConnection rdDriverNoPrompt, False
End With
Dim rdoSet As rdoResultset
sSql = "select * from contoh1 where name= & Text2.Text &"
Set rdoSet = rdoCn.OpenResultset(sSQL)
vVar = rdoSet.rdoColumns.Item(0)
rdoSet.Close
Set rdoSet = Nothing
rdoCn.Close
------------------
smalig
[email protected]
http://vbcode.webhostme.com/
-
Dec 22nd, 1999, 05:54 AM
#5
Thank you for your support, but still error
----------
Private Sub Text2_LostFocus()
Dim ssql As String
Dim rdoCn As New rdoConnection
With rdoCn
.Connect = "DSN=Abu;UID=contoh;PWD=contoh1;"
.LoginTimeout = 25
.CursorDriver = rdUseOdbc
.EstablishConnection rdDriverNoPrompt, False
End With
Dim rdoSet As rdoResultset
ssql = "select * from contoh1 where name = '" & Text2.Text & "'"
Set rdoSet = rdoCn.OpenResultset(ssql)**error
///Error message [Oracle][ODBC][ora]ORA-00904 - Invalid Colums name///
vVar = rdoSet.rdoColumns.Item(0)
rdoSet.Close
Set rdoSet = Nothing
rdoCn.Close
Text1.DataField = "address"
Text3.DataField = "telephoneno"
End Sub
Thank you Clunietp and Smalig
-
Dec 22nd, 1999, 06:49 AM
#6
SORRY.....
the error massage is minor at
Text1.DataField = "address"
Text3.DataField = "telephoneno"
////Unable to bind/////////
Thank you....
------------------
Khamal
-
Dec 22nd, 1999, 09:54 AM
#7
Guru
Why are you binding the textboxes AFTER you close the connection? Of course, after you close and release the recordset, you can no longer bind fields to it...
-
Dec 22nd, 1999, 09:57 AM
#8
Guru
Are you binding your textboxes to a data control, and then setting the recordset of that data control?
You cannot bind controls to a recordset if you create the recordsource at runtime....
-
Dec 24th, 1999, 03:39 AM
#9
TQ Cluenitp;
Suddenly i found what i need is the ADO connection, tQ for you support. and i appreciate you and desribe you a very helpfull person.
I'm new in VB previously in Delphi, so i hope that my question above did not wase you any.
------------------
Khamal
-
Dec 24th, 1999, 02:41 PM
#10
Guru
I NEVER would have guessed that one! It seems that you were keen on using RDO.
Oh well, at least I got you thinking!
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|