473,761 Members | 4,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type name is invalid for Stored Procedure

I have a problem executing the following Stored Procedure from code.
The SP Text runs like this:
ALTER PROCEDURE prc_InsertContr actDirectStatus *_tmp
@var_ContractID VARCHAR(50)
insert into tblContractAudi tHistory (ContractID)
VALUES (@var_ContractI D)
The VB code which calls the procedure runs like this:
Dim adoRs As ADODB.Recordset
Dim adoCmd As ADODB.Command
Dim adoPm As ADODB.Parameter
Dim strContractID As Variant
Dim strContractStat us As Variant
Set adoCmd = New ADODB.Command
With adoCmd
.ActiveConnecti on = strConnection
Set adoPm = .CreateParamete r("ContractID ", adVariant, adParamInput,
, strContractID)
.Parameters.App end adoPm
.CommandText = "prc_InsertCont ractDirectStatu *s_tmp"
.CommandType = adCmdStoredProc
adoCmd.Execute
End With
However i get the following error message:
Type name is invalid.
Error code : -2147217872
Any ideas as to why this is happening?

Jul 17 '05 #1
1 7578
In the SP you have :

prc_InsertContr actDirectStatus-_tmp
whereas in the code you have:

prc_InsertContr actDirectStatu-s_tmp
Note the position of the dash.

--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
----------------------------------------------------------------------------
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
----------------------------------------------------------------------------

"Chris Asaipillai" <ch************ **@btinternet.c om> wrote in message
news:42******** *************** @news.zen.co.uk ...
:I have a problem executing the following Stored Procedure from code.
:
:
: The SP Text runs like this:
:
:
: ALTER PROCEDURE prc_InsertContr actDirectStatus-_tmp
: @var_ContractID VARCHAR(50)
:
:
: insert into tblContractAudi tHistory (ContractID)
: VALUES (@var_ContractI D)
:
:
: The VB code which calls the procedure runs like this:
:
:
: Dim adoRs As ADODB.Recordset
: Dim adoCmd As ADODB.Command
: Dim adoPm As ADODB.Parameter
:
:
: Dim strContractID As Variant
: Dim strContractStat us As Variant
:
:
: Set adoCmd = New ADODB.Command
:
:
: With adoCmd
: .ActiveConnecti on = strConnection
:
:
: Set adoPm = .CreateParamete r("ContractID ", adVariant, adParamInput,
: , strContractID)
: .Parameters.App end adoPm
: .CommandText = "prc_InsertCont ractDirectStatu-s_tmp"
: .CommandType = adCmdStoredProc
:
:
: adoCmd.Execute
: End With
:
:
: However i get the following error message:
: Type name is invalid.
:
:
: Error code : -2147217872
:
:
: Any ideas as to why this is happening?
:
:
:

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3540
by: Együd Csaba | last post by:
Hi, I've a problem with some of my stored procs. My config is: RH7.1, Postgres 7.3.2 I had converted a few fields of a few tables from one type to another and after this I made all the necessary changes on the functions and recreated all my types and functions. It seemd to be all right, but the newly created functions won't work anymore.
0
1680
by: Raquel | last post by:
This simple piece of code in a try-catch block in SQLJ stored procedure is failing with CLI0611E - invalid column name: #sql sproc3_iterator = {SELECT FIRSTNME, LASTNAME FROM DB2ADMIN.EMPLOYEE WHERE WORKDEPT = :workdept}; rs1 = sproc3_iterator.getResultSet(); ctx.close(); I have (re)checked that FIRSTNME nad LATNAME are valid columns of the
3
5108
by: Odd Bjørn Andersen | last post by:
When our application tries to send a parameter of the type adDBTimeStamp to DB2 we an error message saying SQLSTATE 22007 An invalid datetime format was detected; that is, an invalid string representation or value was specified. We get this message after upgradeing to DB2 Enterprise Edition V8.1 fixpack 6. On db2 version 7.2 it worked fine. --
3
3688
by: Mr.KisS | last post by:
Hello all, I'm working with : WinXP PRO SP1, MS SQL 2005 Express, Visual Web Dev 2005 Express. I have an aspx page which must execute a stored procedure : ______________ try { myCommand.ExecuteNonQuery();
1
4905
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm specifiying my code: The Code used in Visual Studio: Function GetRank(ByVal ID As Integer, ByVal Comp As String, ByVal Sec As String, ByVal iDate As Date) As String 'Dim Ret As Integer
0
2569
by: lee.swanson | last post by:
Hi, I am trying to run a create procedure statement and I am getting the following error with a create table statement within the procedure highlighted: in QSYS type *LIB not found. Cause . . . . . : SWANSONL in QSYS type *LIB was not found. If this is an ALTER TABLE statement and the type is *N, a constraint was not found. If this is not an ALTER TABLE statement and the type is *N, a function, procedure,
4
27489
by: daz_oldham | last post by:
Hi All I am trying to execute a stored procedure that does a very simple lookup and returns a text field. However, when I try to execute it, I am getting a rather strange error that I can't seem to fix! There is defiantely information coming back as I have tested this in Query Analyzer. The error actuall comes on my oCmd.ExecuteNonQuery(); String: the Size property has an invalid size of 0.
9
3876
by: weirdwoolly | last post by:
Hopefully someone will be able to help. I have written a stored procedure in C++ called from a Java test harness to validate the graphic data types in C++ and their use. I have declared the vargraphic input parameters along the following lines in i_vargraphic100 vargraphic(100) and they are populated from String's in java.
3
7422
by: ianforgroupuse | last post by:
I'm running Vista Business edition on 2005 Virtual PC. Installed SQL Server 2005 Express latest download, with instance of MSSQLSERVER and service accounts running under "NT AUTHORITY\SYSTEM". Mixed mode authentication specified and sa password specified. Used server manager to create user login with sysadmin role. Login using windows authentication. Run my application and database is created and populated with default records.
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.