?
Solved

inserting into oracle from vb

Posted on 2003-10-31
8
Medium Priority
?
245 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

765 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