Solved

inserting into oracle from vb

Posted on 2003-10-31
8
242 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 75
VBA Shell can't Find Word document 11 108
Help me. 3 60
Set email body to html using vbscript 6 49
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

789 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