Solved

inserting into oracle from vb

Posted on 2003-10-31
8
239 Views
Last Modified: 2010-05-18
hello experts,
Please help, i am having a problem in execting some queries of  Oracle

from vb.
actually i have connected with an Oracle 8 table via DSN. the

connection gets established and i can succefully execute Select query.

i can move into record set object also.
BUT i can execute Insert Into.. , Delete from..., Update... commands. i

think those queris which do not retun any recordset are not running i

was trying to run it using :-
      
      ;      
      ;
      set cmd=new adodb.command
      ;
      ;
      cmd.execute "Insert into login values('a','b')"
      msgbox("Recrod Inserted !!")

my program displyas the msgbox but when i enquire from Oracle, it does

not  show the newly inserted record.
Is there any need to set any particular properties of conn object or of

cmd object for this.
      
Please help and oblige
waiting..
Sandeep.
0
Comment
Question by:soodsandeep
8 Comments
 
LVL 5

Expert Comment

by:rajaamirapu
ID: 9662330
Are you using BeginTrans and ComitTrans in your code
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 9663968
Have you ever considered that it might be time to maintain your many old open questions:

1 11/26/2002 100 Creating .COM file instead of .EXE file ...  Unlocked C Programming
2 01/29/2003 30 cOs.obj in c/c++?  Unlocked C Programming
3 04/24/2003 40 Hard disk management  Unlocked Hardware
4 01/07/2003 50 Finding the Capacity of ROM.  Unlocked C Programming
5 01/07/2003 25 Knowing the capactiy of ROM chip or L1, ...  Unlocked Hardware
6 02/07/2003 50 Polymorphism  Unlocked Programming Languages

Just curious,
Anthony
0
 

Author Comment

by:soodsandeep
ID: 9669399
hello Anthony,
thanks for reminding me.
i will soon evaluate and submit my rating for each answer.
take care.
Thanks.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Expert Comment

by:Deshin13
ID: 9670942
Try this out
Dim ModSec as String
Dim rsSec as ADODB.Recordset
Dim myConn1 as ADODB.Connection

Set myConn1 = New ADODB.Connection
'Then set myConn1 properties to whatever it is that you like
myConn1.Open

Set rsSec = New ADODB.Recordset
sModSec = "Insert into login values('a','b')"

rsSec.Open sModSec, myConn1, adOpenKeyset

' and that should do it
0
 
LVL 9

Expert Comment

by:Dang123
ID: 9674205
Oracle is transaction based. As rajaamirapu mentioned above, you need to issue a "COMMIT" for your transactions to take effect. If you disconnect before you issue a "COMMIT", Oracle will assume the connection was broken due to a problem and automatically issue a "ROLLBACK" for you.



0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10457154
PAQed - no points refunded (of 100)

Computer101
E-E Admin
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now