i am using another software in my VB form using an OLE container. i need to retrieve the value generated by that software into my form. is it possible ? plz help me out

and i have another doubt.
i am using ADO connection to connect to backend in the form. so at the same time i am using two tables to retrieve and save data into. but my problem is, i want to save the same textbox value in both the tables . can i connect two datasources (i have two connection strings ) to the same textbox ? is it possible ?

HI,

Upto my knowledge, it's not possible to read value Directly from the other applcation software,

it can be achived that application software has provision to pass the Data to variable

for example,

Result=application(Inputdata)
If that application has the facility call from external and return value to variable this is possible
search that, is there is any facilty to trnsafer the result from that application to variable

and for the second one,

your data is not clear,
i think you are using static connection()

use dynamic connection(Runtime connection)

There is no problem in usung a control and its value for multiple connections,

Hope this will help you,

with regards
Venkatramasamy SN

thank you for your help .. i will check it with the OLE container . thank you so much

in the second problem, this is the code i am using .


Dim db As Connection
Dim adorecordset As Recordset

Set db = New Connection
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;data source=C:\Documents and Settings\Administrator\Desktop\test prj\testdb.mdb;"

Set adorecordset = New Recordset
adorecordset.Open "select * from comm_rpt", db, adOpenStatic, adLockOptimistic

Set txt_refno.DataSource = adorecordset
txt_refno.DataField = "ref_no"

' here i use adorecordset to refer to the txt_refno text box...
' i need the same value to be stores in another table also.
' so can i use the following coding with the above code ?

Dim db2 As Connection
Dim adorecordset2 As Recordset

Set db2 = New Connection
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;data source=C:\Documents and Settings\Administrator\Desktop\test prj\testdb.mdb;"

Set adorecordset2 = New Recordset
adorecordset2.Open "select * from install_tabl", db, adOpenStatic, adLockOptimistic

Set txt_refno.DataSource = adorecordset2
txt_refno.DataField = "ref_no"

Hi,
The solution is simple in this context,

dont set the recordsource property

Assign the data to the control(Textbox) throught External code
to achive this each time you have assign the data to the control while query executed

For example consider the Rs is your recordset
and Filed Name is 'Name'
Then write a function like the following,

public Function display()
TextName.text=RS!Name
end Function

if you need to get the data from the Textbox, simple use the .Text property
for example

query="select * from TableName where Regno=' & textRegno.Text & "'"

Tehn Execute the Query

Hope, This wil help you,

With regards,
Venkatramasamy SN

thanks very much :) u did a great help for me

HI,
if your problem is solved then mark the thread as Solved...

With regards
Venkatramasamy

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.