ASPX File Output Differs From SQL Stored Proc

Apr 19, 2011

<div class="body">

I am developing an ASPX file that returns results from a SQL stored proc into a data adapter, which is then displayed in a GridView. But the problem is that the numbers do not match between the SQL stored proc and Gridview. They are close, but are off just slightly: 3 thousandths. So the SQL Stored proc gives me 0.199, but in Gridview this same value = .203. And it doesn't appear to be a rounding issue either. Also, I looked at the Gridview properties, but I didn't see anything that would be causing this. All of the values for this one column are off by the same margin.

What troubleshooting steps can u recommend? I am using VB in a VS 2008 Shell for SSRS, SSIS. Here is my code from the main ASPX file:

<%@ Page Language="VB" Debug="true" Src="../Global.vb"%>
<%@ Import Namespace="ChartDirector" %>
<%@ Import Namespace="System.Data" %>

[CODE]..................

And portions of the global.vb file:

Namespace GlobalFunctions
Public Class GlobalF

[CODE]................

I would like to debug this, but this is the shell and so I don't seem to have the debug options. I can set breakpoints, but all of the Debug functionality is greyed out. This may be because I can only create SSAS/SSIS/SSRS projects

View 2 Replies


ADVERTISEMENT

ASPX File Output Differs From SQL Stored Proc?

Apr 18, 2011

I am developing an ASPX file that returns results from a SQL stored proc into a data adapter, which is then displayed in a GridView. But the problem is that the numbers do not match between the SQL stored proc and Gridview. They are close, but are off just slightly: 3 thousandths. So the SQL Stored proc gives me 0.199, but in Gridview this same value = .203. And it doesn't appear to be a rounding issue either. Also, I looked at the Gridview properties, but I didn't see anything that would be causing this. All of the values for this one column are off by the same margin.

What troubleshooting steps can u recommend? I am using VB in a VS 2008 Shell for SSRS, SSIS. Here is my code from the main ASPX file:

[Code]...

View 1 Replies

Stored Proc As Aspx Datagrid Source?

Dec 7, 2010

Currently I have the following in default.aspx

View 6 Replies

Download Output Of An Aspx File Using HttpWebRequest?

Apr 20, 2009

I'm trying to import data from our database into the Property Agent module for DotNetNuke. I can do every thing ok except for one issue.

Some units have their images stored as simple urls and those are no problem. The problem I'm having is some of our images are actually retrieved from an aspx page the outputs the image data and the browser displays that.[code]...

View 1 Replies

Asp.net - Why Does Ms Sql Stored Proc Only Return An Integer

Nov 4, 2010

I am using vs2008 making an asp.net.vb app. The following stored procedure resolutely insists on returning an integer. I on the other hand was hoping for, and expecting, a single name to be returned. Can anyone help amend the sp or describe what I need to do to get the result I desire.

ALTER PROCEDURE [dbo].[getusername]
(
@email varchar ,
@retvalue nvarchar (10)output

[code]...

View 4 Replies

Exec Stored Proc With Parameter

Jun 17, 2011

I'm having troble getting my code to recognize the parameter for my Stored Procedure.This code below show how I select my files (commented out all other files to make sure one works first)It selects my files through the OpenFileDialog box, it loads the name & location of the csv file into memory and then I want to run a SP to import the csv into my database. I have set the SP up ok as it works through SSMS. [code]

View 8 Replies

Updating A Stored Proc Programatically?

Oct 6, 2008

Has anyone updated a proc in code, outside of SSMS? It's easy enough to change the stuff after the ALTER statement, but what I can't figure out how to change the comments before it.

View 17 Replies

Using Stored Proc For Insert Command?

Mar 12, 2009

first of, here's what i'm using.

Visual Basic 2005 Express Edition
Oracle Database 10g Express Edition

i created a procedure stored in the oracle database create_user and accepts a few parameters...

procedure create_user
( p_user_num out tbl_users.user_num%type
,p_username in tbl_users.username%type

[Code].....

so i run the form, click the AddNew button in the BindingNavigator, enter the data in the textboxes and then click Save. i receive no error but the values of the textboxes are not being passed to my stored procedure. it is creating records but all columns are null.

i checked this by using an SQL Editor to query the table back-end.

View 3 Replies

VS 2008 Call SQL Stored Proc Asynchronously?

Jun 9, 2011

I need to call a stored proc from a .NET web page which takes around 15 min to process. We do not want user not to be able to browse the website in the meanwhile. Is calling it asynchronously the way to go or are there any other recommended ways?

make an asynchronous stored proc call?

View 3 Replies

.net - View T-SQL Syntax Of A Stored Proc-based SqlCommand?

Mar 18, 2010

retrieve the actual T-SQL that is to be executed by a SqlCommand object (with a CommandType of StoredProcedure) before it executes...My scenario involves optionally saving DB operations to a file or MSMQ before the command is actually executed. My assumption is that if you create a SqlCommand like the following:

Using oCommand As New SqlCommand("sp_Foo")
oCommand.CommandType = CommandType.StoredProcedure
oCommand.Parameters.Add(New SqlParameter("@Param1", "value1"))
oCommand.ExecuteNonQuery()
End Using

It winds up executing some T-SQL like:

EXEC sp_Foo @Param1 = 'value1'

Is that assumption correct? If so, is it possible to retrieve that actual T-SQL somehow? My goal here is to get the parsing, validation, etc. benefits of using the SqlCommand class since I'm going to be using it anyway.

View 3 Replies

C# - How To Work Continuously On Other Pages While Executing Stored Proc In Asp.net

Jul 28, 2010

I have a stored procedure that I need to execute from asp.net button , It takes more than 30 mins to execute.

So here I need to show a message like "In Process" while execution and disable couple of links..Once the execution is done I need to show "Last processed data and time" and enable the disabled links.

So in "In Process" stage we have to allow user to access other pages in the site.

View 2 Replies

C# - Reading A Stored Proc Not Working When Passing Values

Oct 7, 2009

Why is this not working for me? What is wrong with my code below? I am trying to read a stored proc and applying values to labels. Getting error that say "Incorrect syntax near CareerInner".........

Private Sub LoadData()
' Define data objects
Dim conn As SqlConnection

[Code]......

View 2 Replies

Defining A Stored Proc For Use With Dataset Using Tableadapter Wizard

Oct 31, 2005

things look good till I reach the Bind Commands to Existing Stored procedures page of the wizard and I select my target spproc (rpt_IPR_...) then I hit the finish button and see the message: invalid object name '#TmpResults' now the dataset seems to setup correctly but was wondering why we are getting this message and should I be concerned. The same proc in Access had no issues. [Code]

Because we where not seeing info on the spproc parms we began to suspect that the query made by the IDE to get metadata was failing and that indeed is the case. (we also switch to non-production database to reproduce the issue)after some great SQL debugging from Kevin Currier here at Mindsolve the problem seems to be the SET FMTONLY OFF; SET FMTONLY ON; that the framework is using to get metadata info for the [Code]

View 18 Replies

Sql Server - Converting Complex Sql Stored Proc Into Linq

Jan 24, 2011

I'm using Linq to Sql and have a stored proc that won't generate a class. The stored proc draws data from multiple tables into a flat file resultset. The amount of data returned must be as small as possible, the number of round trips to the Sql Server need to be limited, and the amount of server-side processing must be limited as this is for an ASP.NET MVC project. So, I'm trying to write a Linq to Sql Query however am struggling to both replicate and limit the data returned. Here's the stored proc that I'm trying to convert:

[Code]....

View 1 Replies

.NET Code To Call A Stored Proc And Store The Result In A String?

Oct 5, 2009

What I need to do, is to call a SQL stored procedure from VB.NET, and then store the returned query value in a string.

View 13 Replies

Unable To Access Textbox Variable Declared In Aspx File From Aspx.vb File

Dec 27, 2011

I have following abc.aspx file:

[Code]...

When i try to use this it gives error: txtSearch is not accesible? what am i doing wrong here? This is not complete code just a snippet. But i think it gives an idea what am i trying to do.

View 1 Replies

Sql - Passing Parameters To A Stored Proc Accepting In Parameter Of Type XML Type?

Jun 7, 2011

I have a storedproc accepts parameters in XMLtype as

CREATE OR REPLACE PROCEDURE GetDetails(
p_para IN XMLTYPE,

[code].....

View 1 Replies

Dynamically Output Checkboxes To Aspx Page In Program?

Feb 10, 2010

I have 50 checkboxes that I need to write onto an aspx page. Each checkbox comes with 3 textboxes.[code]...

Now this shall go for all 50 states, depending on which states the person wishes to donate. In each state's row shall be a checkbox. So initially the page shall have value 0.00 in donation and new donation checkboxes, but all 50 states shall be visible. When the person puts a value of donation in certain state, that state shall get "checked" value and the donation, after submitting. On reloading, the value shall be populated automatically and checkbox checked automatically.

How do I make these 50 checkboxes in VB.NET?

View 2 Replies

Ms Sql Stored Procedure Return Data Without Output?

Mar 16, 2012

i am trying to find examples of getting data back from a stored procedure that has no parameters sent to it nor has any returned output parameter. Though it does display data.How can i get that from my code im using below?

Dim myCommandSQL As New SqlCommand
Dim myReaderSQL As SqlDataReader = Nothing
Dim intX As Integer = 0[code]....

The @return_value i just put there to see what would happen but i got nothing returned.

View 2 Replies

Call A Stored Procedure With OUTPUT Parameter?

Jul 31, 2009

in my SQL 2005 database I have defined this stored procedure:

CREATE PROCEDURE [dbo].[CheckOrders] (
@PK_Customer uniqueidentifier,
@Amount bigint OUTPUT)

[code]....

When I check the value of nAmount it stil contains the original value -1 the output value didn't return from the stored procedure although the number of records updated is 0 or more. The procedure was checked, it works and there are records updated and the value of @Amount is SET to a value 0 or more. I just don't get the values back. eventough the parameter @Amount is defined as OUTPUT. I also tried with outParam.Direction = Data.ParameterDirection.InputOutput instead of outParam.Direction = Data.ParameterDirection.Output . Same result. How do I get the value back from the stored procedure?

View 4 Replies

DB/Reporting :: Stored Procedure OUTPUT To Variables?

Apr 26, 2010

I have been banging my head against a brick wall for 2 days on this one. Someone please help, I am sure I am doing something stupidly wrong.I have a stored procedure that accepts 2 inputs and has 4 outputs. The SP checks the users database against a given username and password.

[Code]...

View 3 Replies

Display A Value Of An Output Parameter From A Stored Procedure

Jul 8, 2009

How would I use a value from an output parameter from a stored procedure in a vb 2005 application. I would like to capture a run date from the procedure and show it on several forms in the app.

View 2 Replies

Output Parameter For Stored Procedure Failing?

Sep 24, 2009

Output Parameter For Stored Procedure Failing?

View 2 Replies

Read Without An Output Parameter Of A Stored Procedure?

May 22, 2010

The mSSQL server I have a stored procedure. That does not have an output parameter.When I run it in SQL Management Studio so the procedure will output 1 cell.

EX:
create procedure [000].[test]
as

[code].....

View 3 Replies

VS 2008 : Proc.MainModule.FileName Has Repeated File Path

Dec 25, 2009

in my program, i use that code for getting the file path of a process, once it gets the path, it is put into a list view which has details like the task manager. the code works fine the first time, but with a little bug that is, when it reaches the vhost of my program. For some reason, it just copies the file path of my program even though the process has changed. After the code has gone through, i want it to refresh the list so as doing the same as when loaded...so I let it refresh and once again it copies the path of the vhost, but this time it has basically taken over every process' location. So in turn, I only get returned my programs location, for something like the task managers location, where it would be like "C:Windowssystem32skmgr.exe"

Here's the

VB
Private Sub frmmain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Process As New Process()
Dim Count As Integer = 0

[code]....

The refresh code is frmmain_Load(Nothing, Nothing) just to make things easy for me right now, while i get that part of the program going. To me it seems to be working fine, but why it does that what it does, im not sure. as you can see, the process changes. and Ive even checked it through run time, and each and every time, the process.processname changes.

View 16 Replies

Truncated Output Parameter Returned From Stored Procedure In A Web Application?

Mar 6, 2010

I have a very simple stored procedure built in SQL Server 2008 that looks like this.

CREATE PROCEDURE [dbo].[usp_delBannedIP]
-- Set Required Parameters
@RowID int,

[code].....

View 2 Replies

Asp.net - Stored Procedure Syntax Structure - Catch The Output @messase In Label

Jan 8, 2012

This is my stored procedure

[Code]...

View 1 Replies

Design A Program That Can Encrypt And Decrypt Messages Stored In Simple Text Files Using A Private Key Stored In A Separate File?

Jun 13, 2011

Need to design a program that can encrypt and decrypt messages stored in simple text files using a private key stored in a separate file. Software should also be able to allow the users to enter simple messages that either displays the encrypted or decrypted message. The encryption method should use a simple substitution method. It should be set out in the following format:

Example (the "@" is the separator):

@
The character The Code End of line
A @ 4gh EOL
B @ 84!9 EOL

Has to use the 256 ASCII character codes. The separator will be used to separate the character and its corresponding code.Here are the pseudocodes I have come up with:

� Read any private key file
separator = readline(file);
while not EOF(file) do
tempStr = readline(file);

[code].....

View 5 Replies

Reflection On Structure Differs From Class?

Jan 15, 2009

Code snippet:

Dim target As Object
' target gets properly set to something of the desired type
Dim field As FieldInfo = target.GetType.GetField("fieldName", _
BindingFlags.Instance Or BindingFlags.Public Or BindingFlags.NonPublic)
field.SetValue(target,newValue)

This snippet works perfectly IF target is set to an instance of a CLASS.However, if target is set to an instance of a STRUCTURE, the code does not actually change the value of the field. No error, but the value remains unchanged.And, oddly, if I'm stepping through code, watch the SetValue fail to do anything, and immediately go to the Immediate window and type exactly the same SetValue operation, that works.

Edit:

Per request from Jon Skeet, actual code:
Private Shared Function XmlDeserializeObject(ByVal objectType As Type, _
ByVal deserializedID As String) As Object[code].....

View 2 Replies

Pass A Value Bounded With A Button In Form1.aspx To Form2.aspx?

May 2, 2011

Im trying to pass a value bounded with a button in form1.aspx to form2.aspx

form1.aspx:
<asp:Button ID="Button1" runat="server" Text="Button" CommandArgument = '<%#Eval("Parking_ID")%>' />

[code].....

View 2 Replies







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