I started with Turbo Pascal 3, went to TP5, Bought TP6 called Borland the next day and downgraded to TP5.5. Bought Delphi 3, and now have Delphi 5 Enterprise. I sort of lost interest in writing code about 4-5 years ago for two reasons;
Spent all day writing ASP & SQL for someone else.
PC Techniques magazine went away.
I've got a few ...
This is my first go at LINQ to SQL. I create my dbml in the designer using a SQL Server Express database. I create a stored procedure called StoredProcedure1, which I also dragged into the dbml. Then I wrote up some code to test if I could update some of the fields. The problem is that no updates occur to the database, but I see the ...
I had created following procedure.
DELIMITER ;;
DROP PROCEDURE IF EXISTS getAllPortfoliosDemo;;
CREATE PROCEDURE getAllPortfoliosDemo( IN keyid INT(10))
BEGIN
DECLARE whereString char(100);
IF (keyid > 0 ) THEN
SET whereString = CONCAT( ' WHERE pkid = ', keyid );
ELSE
SET whereS...
Okay, I am new to PHP/Oracle connectors. What I am trying to do is call a simple stored procedure which accepts a id number and returns a value. It works fine if there is a match, but I can't for the life of me figure out how to add conditional logic if there isn't a match. Basically, if there is a match, set $strategy to it, if there ...
When it comes to CRUD operations and your database (SQL Server '08), is it better to write the SQL statements into your code or use stored procedures? Why?
As pointed out below, I omitted LINQ as a third option. This was done because I am not familiar with LINQ. . . yet. If LINQ is a better option, please let me know what I'm missing.
...
Hi!
Let's say we have a stored procedure selecting something from a table:
CREATE PROCEDURE database.getExamples()
SELECT * FROM examples;
How can I use the result from this procedure in a later select?
(I've tried
SELECT * FROM (CALL database.getExamples())
but with no success.)
Should I use SELECT... INTO outVariable in the ...
Hi, Do I need to modify the store procedures if sybase version is enhanced
...
Using ASP, I want to call a stored procedure that returns a recordcount.
I understand that I have to change the cursor type to adOpenKeyset or adOpenStatic to return a recordcount.
What I don't understand is how to modify my vbscript so that it changes the cursor type when calling the procedure.
currently I say
cm.commandtype = adCmdS...
I need to export entries in a table to an .ini file. I need to set this up as a trigger that is performed each time the table is updated.
So if the fields list for the table is MessengerIPAddress, MessengerPort it would ouput
[Messenger]
IPAddress=fieldvalue
Port=fieldvalue
...
I would like to execute a stored procedure from Powershell (v2) against a SQL Server 2008 database. Coming from using C# as my primary language, I'm doing it in that fashion. For example, when I need to run a sproc that doesn't return results, here is what I'm doing now:
$con = new-object System.Data.SqlClient.SqlConnection($connectionS...
Hi all,
Is it possible to pass a table (or table variable) as a parameter of a storedproc when executing the storedproc. If yes then how. I need an example.
Please help.
...
Hi!
Can a MySql stored procedure/function return a table without the use of temp table?
Creating the following procedure
CREATE PROCEDURE database.getExamples()
SELECT * FROM examples;
and later calling it with
CALL database.getExamples()
displays the example table - just as expected - but the following doesn't seem to be possib...
With the following Stored Procedure in SQL Server 2005
IF OBJECT_ID('[dbo].[UserProfile]') IS NOT NULL
DROP PROCEDURE [dbo].[UserProfile]
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE [dbo].[UserProfile]
(
@UserId VARCHAR(20)
)
AS
IF @UserId = 'userId'
BEGIN
SELECT @UserId = 'Yes'
END
ELS...
I have a basic Customer/Order/OrderItem/Product object graph. Customer has Many Orders, Order has Many Order Items, Product has many Order Items. These are successfully mapped using FNH.
I've hit a snag with configuring a stored procedure & fluent-nhibernate. There is not a native way to map stored procedures in fluent-hibernate FNH ...
Hi, I'm coming from a MS SQL Server background.
Working on a new project using MySQL with NaviCat 8 Admin tools.
Ok, here's the question.
Normally when working in MS land if I want to update some data I use a stored procedure to do this:
Drop Procedure spNew
Create Procedure spNew (@P_Param)
UPDATE Table
SET Field = 'some value'
WHERE ...
Given a stored procedure, is there a way to auto generate a Data access layer? I understand that this can be done using Codesmith by creating cs templates, but was wondering if there's a free/paid solution out there.
The plan is for the architecture to have:
ASP.NET code behind -> Business Layer -> Data Access layer -> Stored Procedure...
We have several stored procedures marked as articles for replication in our SQL2000 database. If we update any of them via ALTER PROCEDURE, the changes are applied to the master, but never published to subscribers. Am I missing a setting, or does SQL require a complete reinitialization/snapshot to move the changes out?
...
Is there a way to do with stored procedures what you can do with GetTable?
For example, you can do:
var results = GetTable<Client>().Where() // etc
Can we do that with Sprocs?
I'm trying to avoid the terrible result of using code generation to have strongly typed sproc names. This doesn't adhere very well to persistence patterns no...
In short, where can I find C#/VB client side sample code that calls CLR stored procedure with some argumnet [like a sqlxml data] and receives a datareader or other form of result ?
Also how do I periodically receive information from the running CLR stored proc sent through SQlContext.Pipe.Send() method ?
...
We are experiencing performance problems using a table variable in a Stored Procedure.
Here is what actually happens :
DECLARE @tblTemp TABLE(iId_company INT)
INSERT INTO @tblTemp(iId_company)
SELECT id FROM .....
The SELECT returns 138 results, but inserting in the TABLE variable takes 1min15 but when I use a temp table with the ...