Add to Favorites    Make Home Page 2350 Online  
 Language Categories  
 Our Services  

Home » ASP Home » Strings Home » GetProcedureDef Function

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title GetProcedureDef Function
Description GetProcedureDef returns information about the arguments of a given stored procedure. It returns a reference to a Scripting.Dictionary object whose keys and items collections will be filled about data gathered from the stored procedure. GetProcedureDef is primarily useful for MS Access users only as SQL Server users can just call sp_helptext 'procname' for the complete stored procedure definition of an unencrypted stored procedure. GetProcedureDef has two arguments: connstring and procname.

Arguments
==============
connstring OLEDB Connection String to MS Access database as string. procname stored procedure name as string to lookup for argument information.

Return Values
==============
GetProcedureDef returns a Scripting.Dictionary object, fully loaded. There will be at least one key/item pair in the dictionary at runtime if the stored procedure exists in the target database. Each key/item pair follows this format: key - represents the argument variable name minus the @ character. In TSQL, local variables must be prefaced with the @ character. These will be stripped from the key value. item - represents the data type of the argument variable specified in key. Returns a long. The following table identifies what each data type constant means: constant meaning

20 Eight-byte signed integer (DBTYPE_I8). 128 binary value (DBTYPE_BYTES). 11 boolean value (DBTYPE_BOOL). 8 null-terminated character string (Unicode) (DBTYPE_BSTR). 136 four-byte chapter value that identifies rows in a child rowset (DBTYPE_HCHAPTER). 129 string value (DBTYPE_STR). 6 currency value (DBTYPE_CY). Currency is a fixed-point number with four digits to the right of the decimal point. 7 date value (DBTYPE_DATE). 133 date value (yyyymmdd) (DBTYPE_DBDATE). 134 time value (hhmmss) (DBTYPE_DBTIME). 135 date/time stamp (yyyymmddhhmmss plus a fraction in billionths) (DBTYPE_DBTIMESTAMP). 14 exact numeric value with a fixed precision and scale (DBTYPE_DECIMAL). 5 double-precision floating-point value (DBTYPE_R8). 0 No value (DBTYPE_EMPTY). 10 32-bit error code (DBTYPE_ERROR). 64 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (DBTYPE_FILETIME). 72 globally unique identifier (GUID) (DBTYPE_GUID). 9 pointer to an IDispatch interface on a COM object (DBTYPE_IDISPATCH). 3 four-byte signed integer (DBTYPE_I4). 13 pointer to an IUnknown interface on a COM object (DBTYPE_IUNKNOWN). 205 long binary value (Parameter object only). 201 long string value (Parameter object only). 203 long null-terminated Unicode string value (Parameter object only). 131 Indicates an exact numeric value with a fixed precision and scale (DBTYPE_NUMERIC). 138 Indicates an Automation PROPVARIANT (DBTYPE_PROP_VARIANT). 4 single-precision floating-point value (DBTYPE_R4). 2 two-byte signed integer (DBTYPE_I2). 16 one-byte signed integer (DBTYPE_I1). 21 eight-byte unsigned integer (DBTYPE_UI8). 19 four-byte unsigned integer (DBTYPE_UI4). 18 two-byte unsigned integer (DBTYPE_UI2). 17 one-byte unsigned integer (DBTYPE_UI1). 132 user-defined variable (DBTYPE_UDT). 204 binary value (Parameter object only). 200 string value (Parameter object only). 12 Automation Variant (DBTYPE_VARIANT). 139 numeric value (Parameter object only). 202 null-terminated Unicode character string (Parameter object only). 130 null-terminated Unicode character string (DBTYPE_WSTR).
Category ASP » Strings
Hits 380597
Code Select and Copy the Code
Function GetProcedureDef(ByVal connstring, ByVal procname) Dim cnn, cmd, prm, cat, d Set d = CreateObject("Scripting.Dictionary") Set cnn = CreateObject("ADODB.Connection") ' Open the Connection cnn.Open connstring ' Open the catalog Set cat = CreateObject("ADOX.Catalog") cat.ActiveConnection = cnn ' Get the command object Set cmd = cat.Procedures(procname).Command ' Retrieve Parameter information cmd.Parameters.Refresh For Each prm In cmd.Parameters d.Add prm.Name, prm.Type Next Set cmd = Nothing Set cat = Nothing Set cnn = Nothing Set GetProcedureDef = d End Function

Related Source Codes

Script Name Author
��������������������� VyomWorld
Resistor color code reader A.Chermarajan.
Telephone Directory dhivya
card swapping game (Mini Project) nityanand
simple hangman-pascalsource Seabert
college dirtectory (Mini Project) msridhar
Poll Application John van Meter
ASP Daily Hit Counter. Tejaskumar Gandhi
To avoid null in asp environment using sql Sami
Maklumbalas webmaster
poll John van Meter
EasyASP Template Engine. TjoekBezoer
Basic Calculator using HTML & Javascript. Patrick M. D Souza
What servers support ASP ? VyomWorld
What is ASP? VyomWorld

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions | Important Websites
Copyright ©2003-2024 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=232


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review