954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

data disappearing while i hit tab for moving to next text field

hi guys,
i am using vb6 as front end and oracle as back end for my project.
i am using ADO to connect to oracle database.
can u please help me with the code.
my code is

Dim con As New ADODB.Connection
Dim str As String

Private Sub Command1_Click()
str = "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=oracle40;Persist Security Info=True;"
With con
.Open str
End With
con.BeginTrans
con.Execute "insert into PBS_NAMEADDRESS values('" + o_code.Text + "','" + o_name.Text + "','" + o_address.Text + "','" + o_city.Text + "','" + o_state.Text + "','" + o_country.Text + "')"
con.CommitTrans
Command1.Enabled = False
End Sub

when i run the program and try to enter the values the values entered previously r disappearing.
please help me . its urgent.
also tell me if there are any errors or is there any way to do it.
thank you.

bugmenot
Posting Whiz in Training
225 posts since Nov 2006
Reputation Points: 53
Solved Threads: 34
 

The problem you are facing is not because of this code . You might have specified something else in other parts of the code.

debasisdas
Posting Genius
6,872 posts since Feb 2007
Reputation Points: 666
Solved Threads: 434
 

no this is the only code .... i hav not specified anything else...
i have just given the data sources and data field properties to the texboxex in the form....
will i be able to run d program without changing the properties of the textboxes?

bugmenot
Posting Whiz in Training
225 posts since Nov 2006
Reputation Points: 53
Solved Threads: 34
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You