Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 18th, 2003, 03:26 PM
Registered User
Join Date: Dec 2003
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB arises an error when dealing with database

Hi experts!
I'm new to VB and oracle stored procedure. I had created a
VB code to execute a stored procedure in Oracle,, and in the stored procedure, a link to another oracle database is created.
I created a stored procedure in Oracle database "A" and want to get some data information from oracle database "EVF16" which I don't have any right to create a store procedure or nothing...
Here is my VB code:
'I had something like database connection here...

Dim Cmd As New ADODB.Command
' Use a connection string or a Connection object.
Cmd.ActiveConnection = "Provider=MSDASQL;DSN=" & strDBNAME & ";UID=" & strID & ";PWD=" & strPW & ";DBQ=" & strDBNAME & ";ASY=OFF;"
Cmd.CommandText = "test2"
Cmd.CommandTimeout = 30
Cmd.CommandType = adCmdStoredProc

and here's my stored procedure:
/* Declare string to store SQL Statement*/
v_sql varchar2(1000);

/* Declare string to store SQL Statement*/
v_sql varchar2(1000);

delete from AV_project where proj in (Select proj from av_project@evf16 where proj='xxxx' );
v_sql := 'execute test2';
execute immediate v_sql;

The error's something like : Oracle transaction is not open..or somethign like that...

Please help me..thanks

ANd even I've to add BeginTrans and CommitTrans but still not work.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dealing with drop downs lisabb ASP.NET 2.0 Basics 5 May 28th, 2007 12:29 AM
Dealing with empty properties Quick209 Java Basics 4 June 5th, 2006 08:03 PM
Dealing with DBNull jaucourt VB.NET 2002/2003 Basics 3 January 16th, 2004 10:59 AM
VB arises an error when dealing with database .. learnvb Beginning VB 6 0 December 18th, 2003 03:25 PM
VB arises an error when dealing with database .. learnvb Pro VB Databases 0 December 18th, 2003 03:24 PM

All times are GMT -4. The time now is 01:05 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.