Solved

inserting into oracle from vb

Posted on 2003-10-31
8
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

749 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