Stored Procedures: How In The World Do I Use These Things?

Apr 11, 2008

I was told I can use them with SQLDataSources, but I have no clue how to do it.

I believe I have managed to set up the querry in the datasource correctly, but what do I need to do to actually use it in my VB code?

 

Any help is appreciated, and any tutorials you've found to be usefull on the subject are sure to help.

Thanks

View 3 Replies


ADVERTISEMENT

Unable To Open Things With Stored Pro... In Their Name: Virus

Aug 15, 2007

I can't use the words "stored pro.." in file names, folder names, or internet searches. I also can't click on links with those words in them. (hence my above abbreviations) The application will close down. I'm putting hyphens between the letters in the hopes that if anyone answers this I will still be able to open it.

i.e., I have a folder on my harddrive called "stored pro---cedures" - I can't open it via any windows applications. I named a word document "stored pro----cedure" and it closed the second I typed it in. I can use "stored pro", but not the other, even if i put or remove spaces between the letters. Even if I type other letters at the beginning and the end, the application will close.

I tried to do a Google search on "windows update" and "stored pro..." but the explorer window closed.


Has anyone else had this problem?

View 4 Replies View Related

Stored Procedure Compilation Question: Doing Disparate Things In Aproc

Dec 8, 2007

To minimize the very large number of stored procedures typicallyassociated with an application, I have gotten in the habit ofcombining a select, insert, update, and delete all in one procedure,and passing an argument to indicate which to use. (I use defaultvalues for all input params to avoid having to declare them forselects and deletes.) So I'll have just one PersonAdmin proc insteadof PersonGet, PersonInsert, PersonUpdate, and PersonDelete procsWhile this is nice for housekeeping, I wonder what the compiler doeswith such an architecture,and I fear the worst. The select returns arecordset; the others don't.Is this a bad idea?If it is, I really wish SQL would permit some sort of user folderstructure in the proc list.

View 2 Replies View Related

Oracle Stored Procedures VERSUS SQL Server Stored Procedures

Jul 23, 2005

I want to know the differences between SQL Server 2000 storedprocedures and oracle stored procedures? Do they have differentsyntax? The concept should be the same that the stored proceduresexecute in the database server with better performance?Please advise good references for Oracle stored procedures also.thanks!!

View 11 Replies View Related

Stored Procedures 2005 Vs Stored Procedures 2000

Sep 30, 2006

Hi,



This Might be a really simple thing, however we have just installed SQL server 2005 on a new server, and are having difficulties with the set up of the Store Procedures. Every time we try to modify an existing stored procedure it attempts to save it as an SQL file, unlike in 2000 where it saved it as part of the database itself.



Thank you in advance for any help on this matter



View 1 Replies View Related

All My Stored Procedures Are Getting Created As System Procedures!

Nov 6, 2007



Using SQL 2005, SP2. All of a sudden, whenever I create any stored procedures in the master database, they get created as system stored procedures. Doesn't matter what I name them, and what they do.

For example, even this simple little guy:

CREATE PROCEDURE BOB

AS

PRINT 'BOB'

GO

Gets created as a system stored procedure.

Any ideas what would cause that and/or how to fix it?

Thanks,
Jason

View 16 Replies View Related

How To Search And List All Stored Procs In My Database. I Can Do This For Tables, But Need To Figure Out How To Do It For Stored Procedures

Apr 29, 2008

How do I search for and print all stored procedure names in a particular database? I can use the following query to search and print out all table names in a database. I just need to figure out how to modify the code below to search for stored procedure names. Can anyone help me out?
 SELECT TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'

View 1 Replies View Related

Hello World: SQL Server + ASP.NET

Mar 15, 2006

Hi everybody,
This is propably very silly question...
I've used SQL Server for sometime now, but always through tools supplied by my hosts (my Little Admin, SQL Server Web Admin).
I always wanted to try running the real thing, so I've installed SQL Server 2K developer edition on my machine. I also have IIS and .NET framework running.
What would be the next step to see those 3 components in action? I have noticed Northwind database in the Enterprise Manager. How do I make the connection?
I have the SQL Server Service Manager running fine, but when I open Query Analyzer it comes up with the window "Connect to SQL Server" and this little dropdown, where you can choose the server is actually empty. What do I do?
Thank you all for your pointers.

View 1 Replies View Related

It's Really A Strange World Over In....

Jul 16, 2007

...the Access forum...so many bad practices

Like this one

http://www.dbforums.com/showthread.php?p=6284279&posted=1#post6284279

View 12 Replies View Related

DB Web Access From Around The World

Mar 29, 2004

Here's a nice little scenario:

Say you have users who would be accessing a SQL Server database over the web from around the world (mainly the US, Japan, and UK), and you wanted to make the access as fast as possible.

Say also you have a couple of million dollars for hardware and software.

What architectures would you build?

Thanks.

Henry

View 3 Replies View Related

World Week

Apr 13, 2008

Hi, I have a table ABC. It has 2 columns, A and B. At column A i have 3 rows, Week,Goal,Used. Let say for column B at row Week is WW15 now, after 7 days i want the row to be updated to WW16. How do i do that? Advice please.

View 14 Replies View Related

Hello World: SQL Server + ASP.NET

Mar 15, 2006

Hi everybody,

This is propably very silly question...

I've used SQL Server for sometime now, but always through tools supplied by my hosts (my Little Admin, SQL Server Web Admin).

I always wanted to try running the real thing, so I've installed SQL Server 2K developer edition on my machine. I also have IIS and .NET framework running.

What would be the next step to see those 3 components in action? I have noticed Northwind database in the Enterprise Manager. How do I make the connection?

I have the SQL Server Service Manager running fine, but when I open Query Analyzer it comes up with the window "Connect to SQL Server" and this little dropdown, where you can choose the server is actually empty. What do I do?


Thank you all for your pointers.

View 2 Replies View Related

Hello Model World?

Dec 18, 2007

Hi!
I want to get hole through to Analysis Services 2005
from MS SQL Server 2005 with openquery,
so I created linked server (MSOLAP).
How to test that I can access an "database" on Analysis Services Server?

Something like select * from openquery(linked_olap, getdate())
or openquery(linked_olap, 'print hello world')
or openquery(linked_olap, select results from dataminingmodelCreatedWithVstudio)
?
Thanks
Bjørn

View 4 Replies View Related

Using A Stored Procedure To Query Other Stored Procedures And Then Return The Results

Jun 13, 2007

Seems like I'm stealing all the threads here, : But I need to learn :) I have a StoredProcedure that needs to return values that other StoredProcedures return.Rather than have my DataAccess layer access the DB multiple times, I would like to call One stored Procedure, and have that stored procedure call the others to get the information I need. I think this way would be more efficient than accessing the DB  multiple times. One of my SP is:SELECT I.ItemDetailID, I.ItemDetailStatusID, I.ItemDetailTypeID, I.Archived,     I.Expired, I.ExpireDate, I.Deleted, S.Name AS 'StatusName', S.ItemDetailStatusID,    S.InProgress as 'StatusInProgress', S.Color AS 'StatusColor',T.[Name] AS 'TypeName',    T.Prefix, T.Name AS 'ItemDetailTypeName', T.ItemDetailTypeID    FROM [Item].ItemDetails I    INNER JOIN Item.ItemDetailStatus S ON I.ItemDetailStatusID = S.ItemDetailStatusID    INNER JOIN [Item].ItemDetailTypes T ON I.ItemDetailTypeID = T.ItemDetailTypeID However, I already have StoredProcedures that return the exact same data from the ItemDetailStatus table and ItemDetailTypes table.Would it be better to do it above, and have more code to change when a new column/field is added, or more checks, or do something like:(This is not propper SQL) SELECT I.ItemDetailID, I.ItemDetailStatusID, I.ItemDetailTypeID, I.Archived,     I.Expired, I.ExpireDate, I.Deleted, EXEC [Item].ItemDetailStatusInfo I.ItemDetailStatusID, EXEC [Item].ItemDetailTypeInfo I.ItemDetailTypeID    FROM [Item].ItemDetails IOr something like that... Any thoughts? 

View 3 Replies View Related

How To Save Stored Procedure To NON System Stored Procedures - Or My Database

May 13, 2008

Greetings:

I have MSSQL 2005. On earlier versions of MSSQL saving a stored procedure wasn't a confusing action. However, every time I try to save my completed stored procedure (parsed successfully ) I'm prompted to save it as a query on the hard drive.

How do I cause the 'Save' action to add the new stored procedure to my database's list of stored procedures?

Thanks!

View 5 Replies View Related

Handling World Time With SQL And ASP.NET

Mar 24, 2004

Hi,

I would like to capture date time in my SQL during a certain operation. This piece of data will be displayed to an ASP.NET page.

When displaying the date time, I want it converted to the local time zone equivalent as set in the user's operating system.

What setup do I need on the SQL and the coding in the ASP.NET page?

Thanks.

View 2 Replies View Related

In The World Of J2EE, What Are JSF Component That

Aug 7, 2005

In the world of J2EE, What are JSF component that maps to
the .Net list components?

View 1 Replies View Related

Stored Procedure Being Saved In System Stored Procedures

Apr 7, 2006

We recently upgraded to SQL Server 2005. We had several stored procedures in the master database and, rather than completely rewriting a lot of code, we just recreated these stored procedures in the new master database.

For some reason, some of these stored procedures are getting stored as "System Stored Procedures" rather than just as "Stored Procedures". Queries to sys.Objects and sys.Procedures shows that these procs are being saved with the is_ms_shipped field set to 1, even though they obviously were not shipped with the product.

I can't update the sys.Objects or sys.Procedures views in 2005.

What effect will this flag (is_ms_shipped = 1) have on my stored procedures?

Can I move these out of "System Stored Procedures" and into "Stored Procedures"?

Thanks!

View 24 Replies View Related

How Can I Call One Or More Stored Procedures Into Perticular One Stored Proc ?

Apr 23, 2008

Hello friends......How are you ? I want to ask you all that how can I do the following ?
I want to now that how many ways are there to do this ?



How can I call one or more stored procedures into perticular one Stored Proc ? in MS SQL Server 2000/05.

View 1 Replies View Related

SSIS And Stored Procedures Results Stored In #Tables

Mar 26, 2008

Hello
I'm start to work with SSIS.

We have a lot (many hundreds) of old (SQL Server2000) procedures on SQL 2005.
Most of the Stored Procedures ends with the following commands:


SET @SQLSTRING = 'SELECT * INTO ' + @OutputTableName + ' FROM #RESULTTABLE'

EXEC @RETVAL = sp_executeSQL @SQLSTRING


How can I use SSIS to move the complete #RESULTTABLE to Excel or to a Flat File? (e.g. as a *.csv -File)

I found a way but I think i'ts only a workaround:

1. Write the #Resulttable to DB (changed Prozedure)
2. create data flow task (ole DB Source - Data Conversion - Excel Destination)

Does anyone know a better way to transfer the #RESULTTABLE to Excel or Flat file?

Thanks for an early Answer
Chaepp

View 9 Replies View Related

SSRS Report With Geographic World Map

Jan 3, 2014

I am creating a SSRS report with geographic world map. I am able to to download few shape files and use them.

However, the maps which i have downloaded misses few locations (for e.g. South Sudan which was formed few years back).

Where can i find the latest world map shape file?

View 3 Replies View Related

Sycn Databases From Different Parts Of The World

Mar 28, 2008

Hi all,
New to replication
I need suggestions on how go about keeping 2 sql servers from different parts of the world to be in sync all times, some latency may be accepted.

Here is the senario,
we have website hosted in NA and customers from all parts of the world log in to oursystem and does what ever they have to do which will update the sql server databases. as our company is expanding we want to have a same website hosted in eu, so when ever a person logs from eu he will be hitting the webservers in eu and anything he do will go to the SQL database servers that are in eu. Now the problem i have is when one site goes down say NA site goes down, we need to route all the traffic to site in EU that means sql servers in EU. This brings the challenge of both the servers need to be in sync all times.

I did some research on merge replication, this might not work because in this concept we have to make 1 server as the master and the others as slaves. Also i need to think in a way that if they want to expand more that means to asia, i will be having another server, these all need to be in Sync.

We are using SQL Server 2005 standard edition.
I was reading that this can be achived easily with peer-to-peer replication,but is only available in Enterprise edition which is 4times the cost of standard edition.My company is not going to agree for this, so got to do the research and propose a solution


Any help will be greatly appreciated

View 2 Replies View Related

MS SQL Stored Procedures Inside Another Stored Procedure

Jun 16, 2007

Hi,
 Do you know how to write stored procedures inside another stored procedure in MS SQL.
 
Create procedure spMyProc inputData varchar(50)
AS
 ----- some logical
 
 procedure spMyProc inputInsideData varchar(10)
AS
   --- some logical
  ---  go
-------

View 5 Replies View Related

Calling Stored Procedures From Another Stored Procedure

May 8, 2008

I am writing a set of store procedures (around 30), most of them require the same basic logic to get an ID, I was thinking to add this logic into an stored procedure.

The question is: Would calling an stored procedure from within an stored procedure affect performance? I mean, would it need to create a separate db connection? am I better off copying and pasting the logic into all the store procedures (in terms of performance)?

Thanks in advance

John

View 5 Replies View Related

Real World: Backup Strategy And Implementation, How?

Jan 24, 2007

Real World: Backup Strategy and implementation, how?
A quote:

€œReal World:

Whether you back up to tape or disk drive, you should use the tape rotation technique. Create multiple sets, and then write to these sets on a rotating basis. With a disk drive, for example, you could create these back files on different network drives and use them as follows:


//servername/data1drive/backups/AWorks_Set1.bak. Used in week 1, 3, 5 and so on for full and differential backups.
//servername/data2drive/backups/AWorks_Set2.bak. Used in week 2, 4, 6 and so on for full and differential backups.
//servername/data3drive/backups/AWorks_Set3.bak. Used in the first week of the month for full and differential backups.
//servername/data4drive/backups/AWorks_Set4.bak. Used in the first week of the quarter for full and differential backups.

Do not forget that each time you start a new rotation on a tape set, you should overwrite the existing media. For example, you would append all backups in week 1. Then, when starting the next rotation in week 3, you would overwrite the existing media for the first backup and then append the remaining backups for the week.€?

I understand these concepts, however in €˜the real world€™ how do you go about implementing these jobs in SQL2K and how on earth do you schedule the tasks to overwrite, for example, week 1, when on week 3€™s rotation.

Could I have real world examples or scripts for the jobs that would carry out this task? It appears that whatever course you do, it does not fully cover the above, and I have only worked on my own and never with a DBA, so I have never seen this implemented in any environment.

I would like full details on this please, as I need to get my head around it.

Thanks

Neil

View 6 Replies View Related

I Want Send All Kind Of Phones Arround World

Apr 29, 2007

hai,



I Want to send SMS all kind of phones arround the world,so what can i do for that pls help me...............

View 9 Replies View Related

Select * && Table Name Issue (Reserve World)

Aug 21, 2006

Hi All,

We are trying to read a table name Order through command line SQLcmd.
But it is giving us an error. Order is an SQl2005 reserver word and app programmer created that table who left. No we have problem to read that table through sqlcmd. any ide a how we can do that.

C:>sqlcmd
1> use ACCMedford
2> select * from 'Order'

3> go

Msg 102, Level 15, State 1, Server ACCMedford, Line 2
Incorrect syntax near 'Order'.

1> select * from "order"
2> go

Msg 102, Level 15, State 1, Server ACCMedford,, Line 2
Incorrect syntax near 'order'.

1> select * from order
2> go

Msg 156, Level 15, State 1, Server ACCMedford,, Line 1
Incorrect syntax near the keyword 'order'.



View 6 Replies View Related

Table Partitioning Design In Actual World

May 23, 2008

I have gone through the table partitioning in MSDN, like Designing Partitions to Manage Subsets of Data . But how to do this in actual world, since some db need to partition for 7 days, then archive these days records on the 8th day, while other prefer 14 days/monthly, and run this repetitively for many years? If this is running weekly, how can i generate the scheme and function dynamically? What if ID for row count is not viable?

Sure this will not work:




Code Snippet
CREATE PARTITION FUNCTION [TransactionRangePF1] (datetime)
AS RANGE RIGHT FOR VALUES ('10/01/2003', '10/02/2003', '10/03/2003',
'10/04/2004', '10/05/2004', '10/06/2004', '10/07/2004');
GO





Then how to drop partition periodically?

View 6 Replies View Related

Security Of Viewing The Reports Manager From The Outside World

Aug 31, 2007

How do you stop anyone from the outside world from viewing the report manager?

From typing eg( www.mywebaspreportapp.com/Reports) and directly accessing the report manager?

Is there a security step i missed somewhere?

View 2 Replies View Related

Calling A Stored Procedure Inside Another Stored Procedure (or Nested Stored Procedures)

Nov 1, 2007

Hi all - I'm trying to optimized my stored procedures to be a bit easier to maintain, and am sure this is possible, not am very unclear on the syntax to doing this correctly.  For example, I have a simple stored procedure that takes a string as a parameter, and returns its resolved index that corresponds to a record in my database. ie
exec dbo.DeriveStatusID 'Created'
returns an int value as 1
(performed by "SELECT statusID FROM statusList WHERE statusName= 'Created') 
but I also have a second stored procedure that needs to make reference to this procedure first, in order to resolve an id - ie:
exec dbo.AddProduct_Insert 'widget1'
which currently performs:SET @statusID = (SELECT statusID FROM statusList WHERE statusName='Created')INSERT INTO Products (productname, statusID) VALUES (''widget1', @statusID)
I want to simply the insert to perform (in one sproc):
SET @statusID = EXEC deriveStatusID ('Created')INSERT INTO Products (productname, statusID) VALUES (''widget1', @statusID)
This works fine if I call this stored procedure in code first, then pass it to the second stored procedure, but NOT if it is reference in the second stored procedure directly (I end up with an empty value for @statusID in this example).
My actual "Insert" stored procedures are far more complicated, but I am working towards lightening the business logic in my application ( it shouldn't have to pre-vet the data prior to executing a valid insert). 
Hopefully this makes some sense - it doesn't seem right to me that this is impossible, and am fairly sure I'm just missing some simple syntax - can anyone assist?
 

View 1 Replies View Related

How To Do 2 Things In T-SQL

Apr 19, 2002

I am writting a T-SQL script to install my database. I have figured out all the sets except 2 areas.

1. Give login db_datareader / db_datawriter permissions to a DB
2. Add a DTS Package, it uses a script, and schedule it.

Here's how I do them in EM....

Issue 1: Security - Logins,
Right click on login, select properties
In database access tab, check Permit for DB
In database role, check public, db_datareader, db_datawriter.

Issue 2: DTS - Local Packages
Right click on local package, new package.
Create SQL connection & exe SQL task (attach seperate SQL script)
Save
Right click on newly created package and schedule

View 2 Replies View Related

MSDE Or SQL 2005 Deployment Resources - Real World Input

Feb 9, 2006

I have traditionally done web app and client server programming and am have been playing around with a new tool (Win forms) app that I eventually want to distribute to other developers and a couple of business people in our organization. I have done apps in the past that all connect to a central server for data access. The I'm working on now will have an individual DB per user and should be available locally for a desktop version of the software.

I am looking for more resources on things to consider when deploying an app with either MSDE or SQL 2005 Express. More specifically, items like long term maintenance of the db once it's installed with the user, etc. (DB bloat, transaction files, auto maintenance routines I may want to build in, etc)

I have seen all of the msdn docs on what you need to deploy (and how to do it), but I'm looking fro input from people that have deployed it and any significant pitfalls they have run into with that sort of deployment.

Any links or book references would be appreciated, thank you,

Cy Huckaba

View 1 Replies View Related

Strange Things

Dec 6, 2007

Hello everybody ,
I want you to explain me something that i find a little strange.
Yesterday i had a problem with a huge log file and a friend in here helped me fix this by making a log back up and then shrinking it to 200 MB.Everything went fine.When i returned home i tried something else in a test environment..Here what happened:
I Got a full database back up.
I dropped the database.
I created a new one with 1GB mdf and 250MB ldf.
I vanished the log back -up
I restored the mdf file on the new database
The log file again had the same huge size after the restore.
How did this happen?


I sell my mother in law.Is anybody interested?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved