Invoke A Stored Procedure With LINQ Results In Error?

Apr 2, 2010

My application produces this error System.Data.SqlClient.SqlException: Login failed for user..This started after I added a stored proc in my dbml file. It works fine in my local enviroment, but throws that error when deploy to staging sever. the user it displays is foreign to me?

View 1 Replies


ADVERTISEMENT

Performance Gain In LINQ Query Vs LINQ Stored Procedure?

Aug 6, 2009

if there is that much of a performance gain in running a LINQ stored procedure versus a LINQ query?

View 1 Replies

ADODB Get Results From Stored Procedure

Mar 3, 2009

I had the great fortune to receive the task of converting an ancient VBA Access order tracking application into a stand alone VB application. Along the way I was trying to parameterize their SQL queries, most everything has gone well but now I am getting an error I can't figure out."Item cannot be found in the collection corresponding to the requested name or ordinal."Iam kind of stuck using as much as the old code as possible because the client "knows VB" and wants to be able to edit the code after I'm gone.

[Code]...

View 1 Replies

Getting Results Into Code From An Stored Procedure?

Dec 8, 2009

My app calls for the use of an SP that doesn't return rows from a table, but results based on certain conditions.

View 3 Replies

Only Getting Results From First Select In Stored Procedure Using Datareader?

Oct 3, 2009

And I like the speed of the datareader over a datatable, so I'd like to make this work! Using VB.NET 2005. All the prior responses to the same problem say to return to datareader or use a datatable. I have no idea what return to datareader means.

View 3 Replies

Pass SQL Stored Procedure Results To Javascript?

Jul 19, 2011

I have an asp.net page that contains a javascript function. I am using a vb.net code behind to run a stored procedure against the database to pull back address information. Results can be 1 or more rows. I need to pass the results to the javascript for processing. My code is as follows:

VB.NET

Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

[Code].....

View 2 Replies

Populate A Combobox Using The Results Of A SQL Stored Procedure?

Jan 11, 2012

I'm having a devel of a time getting what I figure is something simple to work.

I need to set up a Combobox where the list of items is created by accessing a stored procedure.

The SQL code is simply (I left off the code to create the sp);

SELECT ItemCode
FROM vw_CodeList
GROUP BY ItemCode
ORDER BY ItemCode

View 1 Replies

Save Results Of Stored Procedure Into Table?

Mar 12, 2009

I have a stored procedure, and I want to save the results of the stored procedure into a table. Is there a way I can do this with a simple query without creating the table beforehand.

View 8 Replies

Tell If A Stored Procedure Does Not Return Results When Using Linqtosql?

Aug 19, 2010

I have a linqtosql dbml where I dropped a stored procedure into the designer interface.

Stored procedure name:
GetUser(@userid int)
Select * from users_tbl where userid=@userid

[code].....

View 1 Replies

Display Stored Procedure Results In A HTML Table?

Jul 12, 2011

I have a very specifically designed table in a .aspx page. I have an <asp:SqlDataSource> tag that works fine with a DetailsView. I have tried DetailsView, ListView, Gridview etc. and cannot obtain the desired design. Is it possible to execute a Stored Procedure and have the individual results displayed in the individual cells of a web page table? This seems like it should be simple but it apparently is not.

View 2 Replies

Sql Server - Calling Stored Procedure And Getting The Results Back

Jan 4, 2012

this is the first time i am calling a stored procedure via vb.net and i would like to make sure i have everything correct before i execute it. This is my code:

[Code]...

The stored procedure returns 6 colums worth of data and i would like to add that data to a listview. I'm not sure i have the correct sytax for doing that but this is what i used in my previous sql code (running a query with, not a stored procedure). Also, i'm not sure how to go about getting data for the @xxx names above from a textbox? How do i pass the values into the @xxx names from the users textbox? The MS SQL mangement studio code is this for the the stored procedure:

[Code]...

View 1 Replies

Tsql - Execute A SQL Stored Procedure And Process The Results?

May 13, 2011

In VB.NET, how do I do the following?

Execute a Stored Procedure
Read through the DataTable returned

View 2 Replies

SQL Stored Procedure Doing Actions On Multiple Recordsets And Then Comparing Results?

Mar 23, 2011

My experience with Stored Procedures is limited and I'm hoping this will solve my payroll problems. Further, for what I'm attempting to accomplish a Stored Procedure may not be the best answer.I'm attempting a Payroll function in which the goal of the Stored Procedure is to fetch the data for a given Payroll Period, do math on the first returned employee, output a calculated result, then move to the next. Let me explain a bit more...Based on a Pay Period ID which is given to the Stored Procedure, I would like it to do the following:Select the employee in that period, add a total of his hours worked, then add that employees total commissions, whichever amount is greater - return that value (along with the totals - such as the total hours and total commission) - then move to the next employee until completed.

View 2 Replies

DB/Reporting :: Adding Message Box If No Results To Display After Calling SQL Stored Procedure

Mar 10, 2009

I have created a search form based on my SQL database to search for individual records based on 3 types of criteria. The form is up and running but I want to be able to add some more code. I have assigned Stored Procedure to each click event for each button. What I wantr to be able to do is after value is added to text box and button is clicked if there are no reults to display than a message box is displayed with adequate message detailing this. Also is it possible to add a count of records to the form. Once value has been enetered ij tyext box and stored procedure runs and fills dataset with required data can I display a box to show number of records from this search.

[Code]...

View 1 Replies

Monitoring And Showing The Results After Starting A Stored Procedure On A Web Application Via Progressbar

Nov 8, 2011

I'm working on a web application called AssetCenter. I have 2 projects, one of them is the application (ACWEBNET) and the other is the web service (IMACWEBSVCS) that contains service related information.

[Code]...

View 2 Replies

Asp.net - Return Two Tables From A Stored Procedure From LINQ To SQL?

Aug 4, 2011

I have written a stored procedure like this:

CREATE PROCEDURE [dbo].[TestProcedure]
AS
BEGIN
SELECT TOP 1 CampaignID FROM Campaigns
SELECT TOP 1 ServiceID FROM Services ORDER BY ServiceID desc
END

In my .NET Project, I have a LINQ to SQL file (.dbml) and I have drag-and-dropped this procedure to create a new class TestProcedureResult:

Partial Public Class TestProcedureResult
Private _CampaignID As Integer
Public Sub New()

[Code]....

So it is not returning ServiceID. How can I retreive ServiceID using LINQ to SQL? I know we can customize stored procedure calls, but how can I customize in this particular scenario?

View 1 Replies

Linq Stored Procedure - Convert C# Code ?

Feb 3, 2010

Can convert this c# code to vb.net code.

DataClassesDataContext dc =
new DataClassesDataContext();

//proc_GetExistProductDetails is a Stored procedure method from my DataContext class.

[CODE]...

View 6 Replies

Pass Stored Procedure Name Dynamically To Linq-to-SQL?

Jul 11, 2011

How can I pass stored procedure name dynamically to Linq-to-SQL, vb.net and get the result into a datatable.

View 2 Replies

Call A Stored Procedure In SQL Using LINQ To Fill A Combobox

May 14, 2012

I have a combobox named cbEmpState, I need to call a stored procedure named 'spStateList' and have it fill the combobox. I'm having a hard time finding examples of this online. The stored procedure is in my dbml file.

Here's the stored procedure


ALTER PROC spStateList
AS
SELECT * FROM states ORDER BY StateName ASC

View 1 Replies

LINQ Stored Procedure Return Value To A String Array?

Mar 24, 2011

I have a stored procedure in DBML and I try to pass the result to "sqlQryArray" as an array(1 dimensional array). But the bottom code causes error like below message. What else should be done?

Error 1 Value of type '1-dimensional array of aaaDatabase.stp_GetSomethingResult' cannot be converted to '1-dimensional array of String' because 'aaaDatabase.stp_GetSomethingResult' is not derived from 'String'.

The return result from stored procedure is a just list of first names of students(only one column)

Dim sqlQry = aaaLINQ.stp_GetSomething(bbb,ccc,ddd)
Dim sqlQryArray As String() = sqlQry.ToArray()

View 2 Replies

String Variable For Use With LINQ To SQL Class Stored Procedure Call Has Weird Message?

Feb 4, 2010

In my project I am using a LINQ to SQL class that contains a stored procedure which includes a string value as an output parameter.So to capture that, I created a string variable as follows in the procedure:Dim spOutput As String? However, when I do this I get the following message "Type 'String' must be a value type or a type argument constrained to 'Structure' in order to be used with 'Nullable' or nullable modifier '?'"

View 2 Replies

Asp.net - .Net Oracle ORA-24338 'statement Handle Not Executed' Error And Some Error In One Stored Procedure

Dec 8, 2009

I have the following Stored Procedures create or replace PROCEDURE WEB_AC

[Code]...

First one: At some point in the application I have the valor parameter (of the visual Basic Function) as a string with spaces that is something like "some string with spaces". When this happens, the stored procedure don't update the table. If I execute the SP directly in the DB (with SQL Developer) all works fine. I know it has something to do with the string missing some quotes(') but I haven't make it work yet. Some ideas on this?

Second problem: Sometimes, when debuging the application, if I interrupt the execution, I start getting the ORA-24338 'statement handle not executed' error for hours every time I try to execute it again. I believe it has something to do with an open transaction. But honestly, as I'm new in working with Oracle, I really have no idea what the problem could be.

[Code]...

View 1 Replies

Call A Stored Procedure From Sql Server Which Work With A Stored Procedure

Sep 11, 2009

The store procedure which give me the information I need is:

USE [UCSMIS]
GO
SET ANSI_NULLS ON

[Code].....

When I try to add it to my report it gives an error, is it because of the temp table and how should I go about it?

View 2 Replies

Error In Displaying Stored Procedure

Aug 15, 2011

A network-related or instance specific error occurred while establishing a connection to sql server. The Server was not found or was not accessible. Verify that the instance name is correct and that SQl server is configured to allow remote connections. (Provider: SQL network Interfaces, error: 26-Error locating Server/instance specified)".

View 4 Replies

Sql - Calling Stored Procedure From .net Timeout Error?

Apr 23, 2010

When calling a stored procedure from vb.net is there a default SQL timeout time if no timeout is specified in the connection string?I am unsure if there is a CommandTimeout specified in the connection string but am going through all the possibilites.

Example if no results after 30 seconds (or more) throw:

`System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.`SQL Profiler says that the script runs and ends in 30 seconds when the program timesout..Tthe script runs without error in about 1 minute 45 seconds by itself in SQL server.

View 4 Replies

Stored Procedure MVC3 Error On Execution

Apr 7, 2011

I got a stored procedure that reads a table and insert those data to antoher table. That's the way how it works because the first table imports data from excel using a package with SSIS.In EF4 I imported the SP and create function import:This SP has 2 IN variables and 2 OUT varibales.The IN varibales are parameters and OUT variables are a message and the number of records created.[code]

View 1 Replies

Error While Inserting Record Using SQL Server Stored Procedure

Jul 4, 2009

I am using sql server 2008 as database server. I have created "AddTest" stored Procedure and using it in my app,

Dim cn As new SqlConnection(connStr)
Dim da As New SqlDataAdapter("Select * from dbo.Subjects", cn)
Dim ds As DataSet

[code]....

View 3 Replies

ODP.NET Query - Error Manipulating Data From Stored Procedure?

Jan 11, 2010

ODP.NET Query - Error manipulating data from Stored Procedure??

View 3 Replies

Sql - Getting Parameter For A Stored Procedure Inside Another Stored Procedure

Aug 29, 2011

I have a stored procedure to update a table, but needs a couple of values from another table.

the first two selects get the value from the table and then are used in the update statement.

The select statments:

Select @iStatusDropDownValueID = iDropDownValueID
From DropDownValue
Inner Join DropDownValueType On DropDownValue.iDropDownValueTypeID =

[Code].....

First, the values that are retrieved by the first two select statements are always the same. So they could be passed in by the code itself. I don't know that this will speed things up at all, just make the entire stored procedure better and easier to read.

Second, if the "Value Name" should change this store procedure will break (which is possible, but not often).

I am looking for any insight into the Best Practices for this situation.

View 2 Replies

Error When Adding Text In Textbox With A Stored Procedure In Mysql

Mar 3, 2012

i am trying to add the the text in the textbox with a stored procedure in mysql this is the error: [Code]

View 14 Replies







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