Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Oracle Package.Procedure Works But Package.Function() Does Not ?


Hi,

I am trying to call a function in a package in Oracle, from VB. I am using the traditional ADODB with connection, command and parameter objects. The function has 6 input parameters and it returns a string value.

We have no problems reaching the similar Procedure under a package, but when it comes to accessing the function, it gives errors. I got "no descriptor found", after some changes "object stored Procedure does not exist" .

Any suggestions on how differently to access a function within a package as opposed to a procedure ?

Thanks,
Arch



Edited by - Archvile on 9/14/2004 3:07:01 PM




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Calling An Oracle Package.Procedure Works But Calling A Function In The Package Does Not ?
Hi,

I am trying to call a function in a package in Oracle, from VB. I am using the traditional ADODB with connection, command and parameter objects. The function has 6 input parameters and it returns a string value.

We have no problems reaching the similar Procedure under a package, but when it comes to accessing the function, it gives errors. I got "no descriptor found", after some changes "object stored Procedure does not exist" .

Any suggestions on how differently to access a function within a package as opposed to a procedure ?

Thanks,
Arch

Oracle Package
I want to use vb to call oracle package and get the parameter value passed from oracle package. Please tell me how to do. Some examples will be appreciated. thanks

Include Oracle Into Package
Hey. Hav done a timesheet program witch connect to a oracle server. Installation works but can not run the program. think its because i dont hav oracle client installed on the target computors? Is there another way?

Calling An Oracle SP That Is In A Package
Hi,

I have a SP that is in a Package and need to call it from VB.

What I have so far is calling a SP that's not in a package :

OracleSPCall.CommandText = "WS_OLY_Reset"
OracleSPCall.CommandType = adCmdStoredProc
OracleSPCall.Execute

Can someone tell me the syntax for calling a Procedure in a package.

Thanx



Bill Paton
william.paton@ubsw.com
http://www.neptune400.co.uk/

Check out www.deepturtle.ch

Package Deployment With VB And Oracle
Hi! all,
I have developed accounting applications with VB6/personal oracle8. Now i have to deploy this application. i have used Inno Setup program for package.

when i install this software at client's coputer, is oracle require in the client machine?

how i automize entire set up process so that when set up finish, my application work by clicking shortcut from desktop?

right now i have to manually install oracle at client side. then i make DSN and the i install my application. i want all this process in set up only.

pls help.

Installation Package Using Oracle
hi..

can we create an installation package in VB and oracle and run it on a machine which does not have oracle installed on it.

thanks for your help!!

Compiling Oracle Package From Vb
Hi,
I have saved a oracle pl/sql package in C drive. Now i want to compile it from vb form (say at the click of a button). Any idea how i can do it.
regds,
bhaskar

How To Use The Datbase Package And The Procedures Of Oracle
Hi

How can i use the package , procedure and function of the oracle with in , out and inout parameters. please give me one example of that .

Regards
Chakresh Kumar

Error In Using RDO To Execute Oracle Package.
The following code is giving me the error below. It's a VB 6.0 app, using RDO to execute an Oracle Package. Can anyone help? I'm using Oracle OraHome92 Driver for my DSN. I am not allow to use ADO to fix the problem, cause it's an existing program, and I need to fix the problem.

Thanks,


Public oConn As rdoConnection
Public rstBoxes As rdoResultset
Public rstBoxes1 As rdoQuery
...

Set oConn = New rdoConnection
With oConn
.Connect = "DSN=DCSRENEW;DATABASE=DCSRENEW;UID=DCSRENEW;PWD=DCSRENEW;"
.CursorDriver = rdUseNone
.LoginTimeout = 5
.EstablishConnection (rdDriverNoPrompt)
End With

................

Dim mySQL As String

mySQL = "{call DCSRENEW.process_bates_num.Get_Bates_number_Range(?,?,{resultset 100,
OUTBATESNUM})}"
Set rstBoxes1 = oConn.CreateQuery("", mySQL)
rstBoxes1(0) = txtDocID.Text
rstBoxes1(1) = txtpackageID.Text

Set rstBoxes = rstBoxes1.OpenResultset(rdOpenForwardOnly, rdConcurReadOnly)


Errorr:
Run time 40002
OUTBATESNUM must be declared..

**note** the out parameter OUTBATESNUM is declared in the store procedure "Get_Bates_number_Range",
and that store procedure has 2 in param & 1 out param.

Execute Oracle Package Thro VB6
<html><div style='background-color:'><DIV></DIV>
<P>Hi,</P>
<P>I have a oracle package.Now i want to execute that package thro VB6 and retrieve the records and store it in a recordset by passing only one parameter.</P>
<P>Can anyone please share your code with me,</P>
<P>Thanks,</P>
<P>VKT<BR><BR><BR></P>
<DIV></DIV></div><br clear=all><hr>Over 6,70,000 brides and grooms. <a href="http://g.msn.com/8HMEENIN/2755??PS=">Click here to join for free.</a> </html>

Oracle Backup And Create Package
I am using VB6 and Oracle 9i to build up my Hospital Mgt. System Application. I want to add a "CREATE BACKUP" feature in my application. I have created a batch file like this

exp USERID=name/password BUFFER=4096 LOG="c:error.txt" FILE=trialpath TABLES..... etc

s=Shell(f.bat)

It works fine. But i am confused wheather it will work or not when i will build an end user setup package. will it work in a system where oracle is not installed? Plzz help me

With Regards,
Rajarshi

Trouble Calling Oracle Package Using RDO
The code below is not running for me. It's using RDO to access an Oracle Package. Does anyone know what's wrong with it? I would appreciate it if anyone who knows how to fix this problem contact me at bruce.yang@merrillcorp.com.

Thanks.

Public oConn As rdoConnection
Public rstBoxes As rdoResultset
Public rstBoxes1 As rdoQuery
...

Set oConn = New rdoConnection
With oConn
.Connect = "DSN=DCSRENEW;DATABASE=DCSRENEW;UID=DCSRENEW;PWD=DCSRENEW;"
.CursorDriver = rdUseNone
.LoginTimeout = 5
.EstablishConnection (rdDriverNoPrompt)
End With

................

Dim mySQL As String

mySQL = "{call DCSRENEW.process_bates_num.Get_Bates_number_Range(?,?,{resultset 100,
OUTBATESNUM})}"
Set rstBoxes1 = oConn.CreateQuery("", mySQL)
rstBoxes1(0) = txtDocID.Text
rstBoxes1(1) = txtpackageID.Text

Set rstBoxes = rstBoxes1.OpenResultset(rdOpenForwardOnly, rdConcurReadOnly)


Errorr:
Run time 40002
OUTBATESNUM must be declared..

**note** the out parameter OUTBATESNUM is declared in the store procedure "Get_Bates_number_Range",
and that store procedure has 2 in param & 1 out param.

Package &amp; Deployment Hangs At Loading Package Types
Using VB6 on Vista. I haven't used my package and deployment for a while but today I recompiled my application and tried to ceate a new package for deployment. It got as far as "loading package types..." and quit. I reinstalled the program a couple of times without success. I noticed at the top of my 'Add-in Manager' there is an item that says "<MISSING>AFVBAddinConnect" if that makes any difference. Hopefully, someone has a solution or reason why this is occurring. Thanks.

Jim S.



Edited by - jschuchert on 8/17/2008 7:05:58 AM

Package And Deployment Wizard Not Generating Package
Hi,

I am trying to generate a package, for a Visual Basic application I wrote, through the Package and Deployment Wizard utility. PDW seems to work great until it gets to the last step. When I click the "Finish" button, instead of generating the package, with its setup and library files, it bombs out/exits without giving any clue/error message why.

I would appreciate any help you could give me on that.

Thanks,

TM

Package &amp; Deployment No Error But Package Not Create
I tried to package my vb program but after i have completed the package and deployment wizard, the wizard just exited without creating the installation package for me. I have check the folder, it only create the setup folder and support folder without files. please advise what could be wrong.

I have tried using the package and deployment for another VB Project without any problem.

Package 'cannot Find File' - L:Package\@test.exe
Hi,

I created a package for my software (written in VB6), but when I try to install, it tells me that a file: L:Package\@test.exe cannot be found (L:Package is the location of the package). Test.exe is supposed to be built into the package, but I get this error. Also, when it tries to remove the installed files, it just gets stuck and crashes.

Anyone got any ideas? - a quick reply would be greatly appreciated.

How Can I Change The Package Size Of Winsock Package.
I have a satellital connection. That´s requieres one maximun package size, the server send a notification of this to the client, but the client forget this.
I need read this notificartion and change the maximun package size!!


TIA

A Stored Procedure On Sql Server That Works Like Vb.mid$ Function
Hello pals!

that´s my problem:

I have to populate a grid using records from a table. The problem is the order that it must be done. There is field called 'code' that has then following structure: XX-Y-ZZ where

XX means the day of the week that classes are scheduled (25 -> monday and thursday, 36 -> tuesday and friday, etc)

Y means what room will be used (1, 2 or 3) and

ZZ means the time that class will be running (01 -> 08:00 am to 09:30 am, 02 -> 09:30 am to 11:00 am, etc).

For example, a class occurring monday and thursday, on room #1 and 08:00 am to 09:30 am will be coded (and stored in SQL Server) as: 25101.

well, I have to order these records first by day of the week, and then by room used. I need something like this:

SELECT * FROM CLASSES ORDER BY [FUNCTION LIKE VB´S LEFT$()](CODE,2), [FUNCTION LIKE VB´S MID$()](CODE,3,1)

I looked for some stored procedure on SQL Server that would make this for me but I haven´t find it.

I supose that I gonna have to create a stored procedure but i don´t know that script language.

Does anyone can help me?

Thanks a lot.



 

VB Package Using Package And Deployment Wizard
I am trying to create VB Package using Package and Deployment Wizard.
Earlier I have created Package successfully
But recently I have installed .Net in my system. From onwards I am getting
“The exception unknown software exception (0xc06d007e) occurred in the application at location 0x7c59bbf3” error while creating VB application package. This is coming at the end of process.

But still I am getting Package. But while installing this package this is giving following error.
“The operating system is not presently configured to run this application”.

I have created this package on Win 2000 operating system.

Please help me. This very urgent.
Thanks,
Kumar

How To Call A Function In A Package From Ado
Hi
I have a appliction which needs to call a funtion which is written in oracle. I can call a function from ado, but if the function resides in a oracle package, how do we refer to that function. do we have to refer the package name.function. here is the code which i wrote to call a function

Private Sub Command1_Click()
Dim st1 As Integer
Dim st2 As Integer
Dim str3 As Integer

Dim cn As ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim param1 As ADODB.Parameter
Dim param2 As ADODB.Parameter
Dim param3 As ADODB.Parameter
Dim fldloop As ADODB.Field

If IsNumeric(Text1.Text) = True Then
str1 = Text1.Text
Else
MsgBox "Enter NUMBER in First Text Box"
End
End If

If IsNumeric(Text2.Text) = True Then
str2 = Text2.Text
Else
MsgBox "Enter NUMBER in First Text Box"
End
End If

' Connect using the SQLOLEDB provider.
Set cn = New ADODB.Connection

provStr = "Data Source=ots_meas;Database=zvprd0;user id=promis;pwd=promisdev;Trusted_Connection=yes"
cn.Open provStr, "promis", "promisdev"

Set cmd.ActiveConnection = cn

cmd.CommandText = "select plus(" & str1 & "," & str2 & ") from dual"
Debug.Print cmd.CommandText
cmd.CommandType = adCmdText

Set rs = cmd.Execute()

If rs.State = adStateClosed Then
MsgBox "RECORD SET CLOSED"
End
End If

Text3.Text = rs.Fields(0)

Set cn = Nothing
Set cmd = Nothing
Set rs = Nothing
Set param1 = Nothing
Set param2 = Nothing
Set param3 = Nothing
Set fldloop = Nothing

end sub



------------------
Anant Molugu
-------------------------
607-974-9180(O)
607-937-4018(R)
anantm@mail.com

Execte DTS Package From VB Doesn't Run &"Execute Package&"
Hey!

I am executing a DTS package from VB. This DTS package has an Execute Package task which executes a child package. Or it should do!! When running from Enterprise Manager the two packages run successfully. When I try to execute them from VB it appears to run successfully, but it is only running the top package.

Any ideas?

Install An MSI Package In An MSI Package.
I'm using Microsoft Visual Studio Installer 1.1 which I find easy to use. But unfortunately it's limited. It doesn't have something like installing additional features. And by installing additional features, I mean to say like a prompt for users if MDAC would be installed or something else. I found an article in MSDN which encapsulates the installation of MDAC. Or more to say, run the MDAC_TYP.exe from the MSI package. Now I want to know if there's also a way to run an MSI package included in an MSI package. In other words, run an MSI package (mostly third party) then run my MSI package to install my application. Is this possible?

Why Method Resync Works In MS SQL And Doesn't Works In Oracle?
Here is my code:

mrst.LockType = adLockOptimistic
mrst.CursorType = adOpenStatic
mrst.CursorLocation = adUseClient

mrst.Resync adAffectCurrent, adResyncAllValues


it works perfectly when application is connected to the MS SQL database, but with Oracle it doesn't work, giving the next error message:

insafficient key column information for updating or refreshing

Procedure Works For First Record Only!!
I have a problem with a procedure: When I am in the first record of the database I can run the procedure, which uses getchunk and appendchunk to insert data in a field, with no problems. Now when I move to the next record to run the same procedure the data is not inserted in the field. Any thoughts on how I can fix this?

Thanks
Bassam

How To Pass An Array To An IN Parameter Of Stored Procedure(of Oracle) When This Stored Procedure Is
first of all thanks for all the answers you guys are sending.they are really helping me in my project.here comes another problem.

i have this stored procedure in oracle

CREATE OR REPLACE PROCEDURE VARRAY_TEST
(SUBJECT_IN IN SUBJECT_TYPE)
IS

I NUMBER ;
BEGIN
FOR I IN SUBJECT_IN.FIRST..SUBJECT_IN.LAST LOOP
INSERT INTO empl VALUES(SUBJECT_IN(I));
END LOOP;

END;

where SUBJECT_TYPE is a varray declared using the following statement:

CREATE OR REPLACE TYPE SUBJECT_TYPE AS VARRAY(10) OF VARCHAR2(10);

and empl is a table name that exists in the database.

i want to call this stored procedure from VB ,passing the values to IN Parameter SUBJECT_IN.

how can i do that.

i tried this code :

Private Sub Command4_Click()
Dim passarray(9) As String
Dim cmdarr As New ADODB.Command
Dim pararr As New ADODB.Parameter
Dim i As Integer

For i = 0 To 9
passarray(i) = "maths"
Next i

Set cmdarr = New ADODB.Command
cmdarr.ActiveConnection = goConn
cmdarr.CommandText = "varray_test"
cmdarr.CommandType = adCmdText

Set pararr = New ADODB.Parameter
pararr.Name = "passarray"
pararr.Direction = adParamInput
pararr.Type = adArray
pararr.Size = 10
pararr.Value = passarray

cmdarr.Parameters.Append pararr

cmdarr.Execute

End Sub

but it doesnt work.gives an error message which says " Arguments are of the wrong type,are out of acceptable range,or are in conflict with one another."

please also try to a sample code.

thanks
regards
Sumit Gulati

Best Way To Package??
Yippee.. I love an opportunity to sound like a newbie.

I am about to distribute a VB app to an office, and I have been using the standard Package and Deployment plugin to do it. However, I feel this setup process leaves a lot to be desired, like unable to place Shortcuts anywhere, and seemingly no other customization options for the installing party. What options are out there and what is considered the "best way to go"? Any help on this will be greatly appreciated! Thanks in advance!

Package
I have a project that i've finished. I've build the package. the project have an access file withe a jet ole connection.
I install the package sucessfully, but i can't open the game, and show the next message:
run time erro 2706 ADO could not find the specified provider.

What files i have to include in the project??

Why Is The Package So Big?
why when using package and deployment wizard the resulting package files are so big even though the size of the project itself won't exceed 2 mb?

DTS Package From VB
Dim objPkge As New DTS.Package
Dim strPkge As String


strPkge = "a_dts_package"
With objPkge
.LoadFromSQLServer "aserver", , , , , , , strPkge
.Execute
End With

This gives me the error 'my login name' is not associated with a trusted connection.

The Application is already connected to an SQL Db there is a global object available, and there has already been activity on the Db at this point. Is there any way to tell the dts package to use the existing connection rather than try to create a new one. I am using NT authentication.

Any advice would be greatly appreciated.

Package With DLL
Hi.

Is there a trick or something special to do to create good dependency with a DLL added to a project ? I'm using an external DLL and it work really fine on my computer with VB. The problem is to make it work on other computer.

I've tried in the packaging to make it shared or not, registered or not. To save it into the installation directory or in the Windows Systems directory. In all case, the function that use the DLL doesn't work on other computers.

Does the fact that the DLL is written in C affect my VB project ?

The "Depends" tools that come with VB indicate dependency about the dll with Kernel32.dll, user32.dll, crtdll.dll, ntdll.dll and gdi32.dll. Should I add those file into the packaging ? I've tried it too but without success...



Thanks

Package Dll
Hi Guys

Ok at the moment in my vb project im using .bas files but these functions are really handy so i decided i'd try and create a .dll file.
The thing is if i package this project using the "Package and Development Wizard" will it register my .dll on the end user's computer. And if it doesnt is there any easy way of doing it besides going around to each individual computer and typing
"regsvr32 c:windowssystemfilename.dll"

Or should i just stick to my .bas file and include it in each project.

thanx
shane

Package
If i make with package & dep wizzard a install for my database after installing on a other dir as c:program filesooksdb it cannot find the database how can i fix it that
vb automatic finds my db.

Package
I tried to reference "Microsoft VBScript Regular Expressions" which is located in "c:winntsystem32vbscript.dll2" and my code work perfectly with this reference. However, when I package, it complain that the file "2" is missing. Do you have any idea with this?

Package
how do you package up an application to install
on another computer. In particular how do you
resister .ocx files etc
many thanks....

Dts Package
hi people, i have a DTS PACKAGE wich several tasks:

1) Creates a new table (a temporary table)
2) Exports data from a Text File to the new Table created before.
3) Proccess the info stored in the temporary table to do some inserts,
updates and deletes in other tables.
4) Deletes temporary table.

It works great but any time i want to execute it in a different database (same server!)
i have to change some properties (manual):
* Database name in the connection Object.
* The complete table name ([databasename].[dbo].[tablename]) in the destination property in the object 'Transform Data task' (it means where the data from file must be exported to..)

i wanted to know how to set a global variable for DATABASENAME at DTS package in order to not to change that 2 properties manually.

Sorry, my english!
Tanks in advance!

Dts Package
A few questions...
I have a DTS Package:
1) how to execute it from query analyzer?
2) inside package i execute a stored procedure...how could i send parameters to that Stored procedure from outside package?

Thanks in advance!
Bye

Run A DTS Package???
Does anyone know how to run a created SQL DTS package from VB?

Thanx in advance.

Sql Dts Package
Hi people! I have a simple question.... I have a DTS Package and i need to execute it from a stored procedure but i dont know how!
Any help?
Thanks in advance!

Package
hi all, i have created package for my vb project in windows 98. when i try to install that package in another system which does not have Visual Studio. i am encountering en error that "ActiveX component can't create object" error is coming.. plz help me to resolve it

Using DTS Package In VB
hi guys. its been long time away from forum

i have a vb app which created database option . i was using


Code:
ShellandWait "osql -S "
..................


and it works fine but if any error occurs i cannot trap it or handle it
i was looking for alternative.

i am using DTSpackage i saved the package as vbmodule and using it. i need to use the event.

so my code code goes like this...



Code:

Option Explicit
Public WithEvents goPackage As DTS.Package

Private Sub goPackage_OnError(ByVal EventSource As String, _
ByVal ErrorCode As Long, ByVal Source As String, _
ByVal Description As String, ByVal HelpFile As String, _
ByVal HelpContext As Long, _
ByVal IDofInterfaceWithError As String, pbCancel As Boolean)
Dim sMsg As String

sMsg = "EventSource: " & EventSource & vbCrLf & _
"ErrorCode: " & (ErrorCode) & vbCrLf & _
"Source: " & Source & vbCrLf & _
"Description: " & Description & vbCrLf & _
"HelpFile: " & HelpFile & vbCrLf & _
"IDofIFWErr: " & IDofInterfaceWithError
MsgBox sMsg, vbExclamation, "OnError"


End Sub

Private Sub goPackage_OnFinish(ByVal EventSource As String)
MsgBox EventSource, vbInformation, "OnFinish"

End Sub

Private Sub goPackage_OnProgress(ByVal EventSource As String, _
ByVal ProgressDescription As String, _
ByVal PercentComplete As Long, _
ByVal ProgressCountLow As Long, _
ByVal ProgressCountHigh As Long)
Dim sMsg As String

sMsg = "EventSource: " & EventSource & vbCrLf & _
"ProgressDescr: " & ProgressDescription & vbCrLf & _
"PercentComplete: " & (PercentComplete) & vbCrLf & _
"ProgressCountLow: " & (ProgressCountLow) & vbCrLf & _
"ProgressCountHigh: " & (ProgressCountHigh)
MsgBox sMsg, vbExclamation, "OnProgress"
End Sub


Private Sub Command1_Click()
MainSub "khalik"
goPackage.Execute
goPackage.Uninitialize
End Sub



and in module... i am assinging the dts object to form public variable

Code:
Set Form1.goPackage = goPackage



seems there some problem the app get hang it happens all the time i have tried several way but havent found a way out...


in simple terms i need to create database for my app with table and all that stuff and shd be able to handle the errors if any...

shd be a different way out

To Package...
My client vb application uses crystal reports. I store ALL the reports in a seperate folder ironically called "Reports".

My question is..when I package my application do I just add the complete folder of "Reports"? Meaning when the application is installed on the end users pc..in some file say:

C:ProgramFilesMyApp..

Then will the reports be in:

C:ProgramFilesMyAppReports??


Thanks

Jon

Package ....?
i have seen several gurus saying P&D is good.. works well.. i see several threads posting problems with it... mostly i have used P&D and very rarelly i use to get some problem..

but this time my boss what me to work on wise... i am no wise enough to work on it.... did any one worked on it and how diff is it with P&D and can i get some sample stuff to start fast...

things have to be done fast on fly....

DTS Package...
hi

working on telecom project i need to load data from txt file to database and process.. so i have design a DTSpackage to do that work fine on my pc when i create a setup package and install on user side the Activex object cannot be created.

any Idea what all file need to be included

Package
can anyone help me?
how do i package my software into an installer kind of thingy? i know Visual Studio has a tool but my program incorporates a few standalone EXEs . can i include those as part of my package too? please help

Package
u can use package & development wizard

just give it the name of ur project

COM+ Package
Hi all,
Any one knows which the most commonly used Authentication level and Impersonation level in COM+ Package

Package
the problem is i need to create a new package, uninstall the existing one at clients m/c., and reinstall it each and everytime at client's machines even for a small change in the application. how can we prevent this? is there any way to do like developer 2000, making executables for each form? will it be advisable?

Copyright © 2005-08 www.BigResource.com, All rights reserved