skip to content »

nonaki.ooo-specstroy.ru

Updating a stored procedure

updating a stored procedure-77

To String 'insert table info Dim filecreatetime As String = System. Get Creation Time(filename1) Dim filemodifytime As String = System. Close() End Sub Private Sub loadrestoftables() Dim i As Integer Dim cr Report Document As New Crystal Decisions. Load(filename1) ' load parameterfields For i = 0 To cr Report Document.

In my Scenario, the First Name and Last names are primary Keys. In the real world, the name could be a company name, example: Best Buy.CREATE TABLE tbl Store( Store Name VARCHAR(30), Store Branch VARCHAR(30), CONSTRAINT pktbl Store PRIMARY KEY (Store Name, Store Branch), Store Address VARCHAR(30) NOT NULL, Store City VARCHAR(30) NOT NULL, Store State CHAR(2) NOT NULL, Store Zip CHAR(9) NOT NULL, Store Phone CHAR(10) NOT NULL, ); If you wanted to use the first and last name to identify the record and also have the ability to pass in new values for the same two columns, you could do this: create procedure sp Upd_Contact Name @First Name nvarchar(50) , @Last Name nvarchar(50) , @New First Name nvarchar(50) , @New Last Name nvarchar(50) as update My Contacts set First Name = @New First Name, Last Name = @New Last Name where First Name = @First Name and Last Name = @Last Name CREATE PROCEDURE sp Upd_Store Info @Store Name VARCHAR(30) , @Store Branch VARCHAR(30) , @Store Address VARCHAR(30) , @Store City VARCHAR(30) , @Store State CHAR(2) , @Store Zip CHAR(9) , @Store Phone CHAR(10) AS UPDATE tbl Store SET Store Address = @Store Address , Store City = @Store City , Store State = @Store State , Store Zip = @Store Zip , Store Phone = @Store Phone WHERE Store Name = @Store Name AND Store Branch = @Store Branch sp Upd_Store Info 'Maple Grove', 'Best Buy','99689 Ruggs Street', 'Minneapolis', 'MN', '55443','6122342345'; What does the @ symbol in the Stored procedure do?I have been trying to find out how to edit a data table using store procedure.So executing function inside stored procedure will never break rule 1, but executing stored procedure inside function may break rule 2. So ultimately strict rule is made that we can't execute stored procedures inside function. This scenario is perfect if there is only one branch per city.

By the way, how would I called the example you mentioned above?

Apply Log On Info(CTable Log Info) Dim loadtablename, loadstoredprocedure As String 'add name to table 'Crystal Reports Insert(reportnametoprocess) Dim fieldcounts, Table Server, Table Data Base As String 'c = CTable.

To String 'was If holdcrystalreportname = reportnametoprocess Then reportnameloop = reportnameloop 1 Else reportnameloop = 0 holdcrystalreportname = reportnametoprocess 'load main report here Crystal Reports Insert(reportnametoprocess) End If 'to get table name when more then 1 table loadtablename = CRpt.

You are currently viewing the BOOK: Beginning T-SQL with Microsoft SQL Server 20 ISBN: 978-0-470-25703-6 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. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. This forum seemed like a party that died years ago!

Connection Info ' Dim a, b, c, d, e, f, g, n As String ' a = cr Table.