List Post With Report

May 12, 2007

Im developing a program where i would like to export to excel. I found the report function, but cant get it to work
Im developing in VB.net and in a form i would like to have this form.

I have a dataset with some fields. I add the fiels into a table. It works but it only show the first record. Not the secound one. It dont give me the oppertunity to step forward or backward.

I if i could i would like all the posts in the database to be show in the same report for exampel

Firstname Lastname
John Mcgreen
Daniel Johnsson
George Anderson


Right now only the first person shows in the report.


Greatful for help



/Mitmit

View 2 Replies


ADVERTISEMENT

Report Designer: Need To List Fields From Multiple Result Rows As Comma Seperated List (like A JOIN On Parameters)

Apr 9, 2008



I know I can do a JOIN(parameter, "some seperator") and it will build me a list/string of all the values in the multiselect parameter.

However, I want to do the same thing with all the occurances of a field in my result set (each row being an occurance).

For example say I have a form that is being printed which will pull in all the medications a patient is currently listed as having perscriptions for. I want to return all those values (say 8) and display them on a single line (or wrap onto additional lines as needed).

Something like:
List of current perscriptions: Allegra, Allegra-D, Clariton, Nasalcort, Sudafed, Zantac


How can I accomplish this?

I was playing with the list box, but that only lets me repeat on a new line, I couldn't find any way to get it to repeate side by side (repeat left to right instead of top to bottom). I played with the orientation options, but that really just lets me adjust how multiple columns are displayed as best I can tell.

Could a custom function of some sort be written to take all the values and spit them out one by one into a comma seperated string?

View 21 Replies View Related

Problem With Passing Report Parameters Using POST Request.

Dec 27, 2006

Hi

We are accessing reports through our web application. Our front end is implemented using tapestry
Our report is using four parameters. The report url is like
http://<servername>/ReportServer/Pages/ReportViewer.aspx?/<Report_Proj_Name>/<ReportName>

We are using POST requests with our report parameters defined as hidden variables.
If we use GET request, with parameters as query string then we are able to view our reports.


When I tried to access the report through web application, it gives out an error message as:


Reporting Services Error
---------------------------------------------------------------------------­-----


An attempt was made to set a report parameter 'formids' that is not
defined in this report. (rsUnknownReportParameter) Get Online Help


---------------------------------------------------------------------------­-----

For POST request, we get the above mentioned error. When I saw the view source I could see that tapestry
internally sets its own hidden variable for persisting its state in session.
formids is one of the hidden variable set by it.

How should I specify in the report that formids is not one of the report parameter.
There may be other hidden variables other than formids too that may get generated at runtime.
What setting should I do at the report end or at the application end?


Please help me find a solution for this problem.

Thanks!

View 2 Replies View Related

Report Builder - Filter Dropdown Order Post 2005 SP2 Incorrect

Mar 7, 2007

Hi All,

Hope someone can help here. Since installing Service Pack 2 onto our SQL 2005 instances our report models are not working correctly. When selecting fields within the models as filters, and getting them to prompt when the report is run, the ordering of the data within the filters does not match the selected ordering in the model definition. The ordering is random each time the report is run.

This issue does not happen when setting the filter up, the data appears in the correct order, but when running the report the filter data is incorrect.

I have spent the last 4 hours building a new system and testing this with each stage of service packing. The RTM version of SQL 2005 is ok, SP1 is also OK, but when SP2 is applied the ordering fails.



Any ideas?



Many thanks in advance.



Regards



Nick

View 4 Replies View Related

Refering To Distinct Values Post(My Other Post)

Oct 22, 2007

---------------------------------------------------------------
My Original Post
I have to query n table(NLRImports) using the Distinct keyword, to retrieve a set of ID numbers. ( "Select DISTINCT id_nbr from NLRImport" ).

Now i want to use those values i retrieved, to process the records in the table(NLRImports) 1 by 1. How do i use those ID no's i retrieved as Variables or parameters for my next query?? If this makes sense?
----------------------------------------------------------------

First, thanks for the response.... now here is what im trying to do.
I created a simple application in delphi to import information to a table in MSSql2005. This is some of the resulting columns...

date | id_nbr | account_nbr | sub_account_nbr | ... etc
-------------------------------------------------------------

Now there will be several entries with the same id no but on different dates, so i take it dates would rather be my pkey.

Then i need to take one person's entries(i work on id_nbr) and go thru all the entries taking the earliest date and comparing all the other entries for that person to the first date and select all the dates more than 19 days after the first date and less than 91 days from first date and place it in a new table.
I used cursor s and while loops to kind of get it going but i know that cursors are not really recommended use but the performance implications dont bother with this particular job.

What other ways should i be using to accomplish this?

thanks, i hope this is clear...

View 1 Replies View Related

Multi-value Parameter In Master Report Passing To Single Param Sub-report In A List.

Aug 20, 2007

Here's tricky one.

I have a fairly complex report that was given to me that was hard coded for single parameters. There is a dropdown for each market (created from a query in SSRS). The users have to run for each market each week.

Is there a way to use this report as a Sub-report inside a list of a master report and then use a mult-value parameter?

I want this multi-value parameter to build the values for the list and then run the "sub-report" for each value.

Essentially, I want to create a for each loop.

Any ideas?

View 4 Replies View Related

Adding Drop Down List In Report

Jan 10, 2006

I am using Visual Studio 2005 to create a report from a OLAP cube.

I am building a drop down list for user to select the desired branch. My mdx query as follow:

with
      member [Measures].[ParameterCaption] AS '[Company].[Branch].Currentmember.Member_Caption'
      member [Measures].[ParameterValue] AS '[Company].[Branch].Currentmember.Uniquename'
select 
    {[Measures].[ParameterCaption], [Measures].[ParameterValue]} on columns,
    {[Company].[Branch].ALLMEMBERS} on rows
from [Profit And Loss]

I would like to add a blank row in the result set, such that I can consider that as selecting ALL Branch

Any suggestions on what should I do?

View 1 Replies View Related

How To Get LIST Of Fields In A Report (designer)

Jun 25, 2007

Hi All,



When I'm building a report in report designer and get error message that says --error like --field textbox25--whats the easiest way to see all my report fields and quickly access them instead of clicking every field in a report?



Ideally a fields map with links to these fields.



thanks



Sonny

View 1 Replies View Related

Anyone Know How To Design Phone List Report?

May 12, 2008

To maximize the number of names and phone numbers we can fit on a page, we'd like to have three or four columns of LastName, FirstName, Number on each page. The first column starts with the A's and goes down until the bottom of the page then goes back up to the top of the page in the second column. When the maximum number of columns (probably 3 or 4) is reached for one page, it starts again in the first column of the second page.

This is what we're looking for...


.style1
{width:83px;}
.style2
{width:77px;}
.style3
{width:65px;}
.style5
{width:82px;}
.style6
{width:79px;}
.style7
{width:62px;}
.style9
{width:71px;}
.style10
{width:70px;}
.style11
{width:113px;}
.style12
{width:129px;}
.style13
{width:70px;font-weight:bold;}
.style14
{width:71px;font-weight:bold;}
.style15
{width:129px;font-weight:bold;}
.style16
{width:62px;font-weight:bold;}
.style17
{width:79px;font-weight:bold;}
.style18
{width:82px;font-weight:bold;}
.style19
{width:113px;font-weight:bold;}
.style20
{width:65px;font-weight:bold;}
.style21
{width:77px;font-weight:bold;}
.style22
{width:83px;font-weight:bold;}




Page 1



LastName
FirstName
Number

LastName
FirstName
Number

LastName
FirstName
Number

Anderson
Fred
1234

Dalton
Mike
4567

Gladden
Tony
7890

Bailey
George
2345

Earl
Beth
5678

Hanks
Marideth
8901

Cox
Natalie
3456

Flake
Spencer
6789

Ingersol
Grace
9012



Page 2



LastName
FirstName
Number

LastName
FirstName
Number

LastName
FirstName
Number

Jackson
Frank
9234

Morrison
Ty
9567

Peters
Hank
9890

Klark
Missy
9345

Nickels
Al
9678

Quinn
Andy
9901

Little
Blake
9456

Oxnard
Will
9789

Rand
Phil
9112



Of course, it will take more rows of data to fill up a page, but this shows the basic idea of what we're trying to accomplish.

Does anyone know how to do this?

Thanks.

View 4 Replies View Related

Get List Of Working Hours Into A Readable Report

Nov 20, 2006

Hi guys, im having bigtime problems transfomring a list of working hours into a readable report.

I got a db with a table that looks like this:

Userid Login Logout
22006-11-20 13:22:002006-11-20 22:31:00
22006-11-19 12:31:002006-11-19 17:31:00
22006-11-18 10:31:002006-11-18 17:31:00

I need to transform that data into this:

Weeknumber Monday Tuesday Wednesday Thursday Friday Saturday Sunday
46 0 0 0 0 0 7 0
47 9.15 0 0 0 0 0 5

All i got so far is this query:
SELECT DATEPART(ww, login) as weeknumber , DATENAME(dw, login) AS day, DATEDIFF(minute, login, logout) / 60.0 as hours
FROM timeliste
WHERE userid = '2'

Which isnt even close to what I want, can anyone give me some clues on what I should do to get it right?

View 9 Replies View Related

A Filtered Parameter List For A Report Using Cube

Dec 14, 2006

I am trying to report against a cube and I want the user to be able to choose the date for the report.

Now the cube dimension has been built against a calendar which contains values for the next 30 years(!) so when I create a parameterized report the list of dates is ridiculously huge.

I want to filter the dates out and show only the dates for which there is data. How do I filter out the list of dates for a parameter?

 

View 3 Replies View Related

How To Generate Any Report That The User Selects From A List

Oct 10, 2007



I know this a simple question but I cannot find an example of using the ReportExecutionService to render a report that doesn't take any parameters. Can somebody provide and example? Or to make it easier, tell me what to change in the msdn example: http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsexecutionservice2005.reportexecutionservice.render.aspx


Thanks in advance,

Chris

View 1 Replies View Related

Filtering Report Data From A Sharepoint List

Mar 16, 2008



Hello,

We have set up reporting in sql 2005 so that we can report from a MOSS 2007 list. At the moment the report is created with all the data from within the list. How could i create a filters so that the user can generate a report by name and date?

Thanks.

View 3 Replies View Related

SSRS Reporting From Custom List Returning 1;# In SQL Report

Apr 28, 2008

Hi,

I have a set up SSRS which is reporting from a custom list in sharepoint to SQL 2005. I have created a parameter on the SQL report to return data from a field in the sharepoint list, however when it retrieves the data i get 1;# in front of the returned data?

Why would this happen?

Any help would be much appreciated, thanks.

View 5 Replies View Related

Reporting Services :: Display A Report From Another Dataset In Same List?

May 29, 2015

I would like to display different addresses in the same list:

I have the query for married couples working, Also, I have a separate query of non-married people working.I would like to create a separate datasets for unmarried people in the same report.-Is there way to setup another the second data set without duplicating the fields from the first datasource. I tried to use alias on the second datasets and it did not work okay.

View 3 Replies View Related

Filtering Sharepoint List Data Using Report Parameters

Mar 27, 2008



We are using xml to pull data from a custom sharepoint list into sql 2005. We have set a parameter that allows the user to filter the data by surname, however when the user tries to filter the list the drop down box brings up a list of every record, so there are duplicate entries for each surname.

Is there a way of filtering this so that there is only one instance of the users surname instead of it showing all the records?

Any help would be much appreciated.

View 2 Replies View Related

Security Report - List Of All Active Users In Database With Their Privileges

Aug 28, 2014

I am looking to write a script that would give the list of all active users in a database with their privileges.

Sample would look something like this.

Login User Schema IsdbOwner canWrite canRead
xyz xyz dbo N Y Y

View 2 Replies View Related

Report Model Not Allowing Users To Filter Using A Pick List

Jan 9, 2008

I have a MSSQL Report Services Report Model set up to allow users to create their own ad hoc reports. The data source for my model is a Named Query that queries a MS SQL view that actually pulls data from a series of tables & other views. When you create a report from this model and attempt to filter the data some of the fileds will provide you with a pick list to select which values you would like to filter on and other fields do not provide you with a pick list but require you to enter the data directly that you wish to filter on. Most of the data fields that I am trying to filter on are varchar fields and like I said some will create a pick list for you to selet from and others will not. This all seemed to start after I changed my data source to a Named Query rather than having my data source as the MS SQL View directly. I did this becuase it seemed that anytime I had to make a change to the views that the data source pulled from it would mess up any existing reports that had been created and this does not happen if I use a named query. I have gone crazy trying to figure this one out so any ideas would be greatly appreciated!

View 1 Replies View Related

How To View Field List On The Left Side Of Report Layout

Jan 4, 2007

I want to see all the fields list on the left side of report layout, you can drag a field and put it on the report.

Thank you very much.

View 5 Replies View Related

(URgert)Is There A Way I Can Increase The Size Of The Drop Down List In My Report Viewer

Jan 18, 2008



Hi,

I have a report on my report server... and it has set for multivalue parameter... but since the particular client has only one plan so they wont have the select all function... but the size of the ddl is so squished that we cannot see the Plan name at all...

So can someone pls help me as to how can i increase it..

Regards
Karen

View 5 Replies View Related

Reporting Services :: Can't See Drop Down List For A Report On SSRS 2012

Oct 20, 2015

Here's my setup:

1) SSRS in native mode
2) 2012
3) I have "Browser, Content Manager, My Reports, Publisher, Report Builder" permissions on the folder that has the report

I can't see the drop down list associated with the report that's hosted inside the folder. Here's what I mean by drop down list -- the one that lists things like: properties, subscribe, etc. In other words If i click on that dropdown arrow, I don't see the list.

View 2 Replies View Related

Use Business Objects (generic List Object) As Datasource To Generate A Report??

Apr 2, 2008

I was wondering if it is possible to use a generic list object to use as the datasource/data for a report? Right now we use these business objects to display information on our website and would be great it we could re-use those objects and create reports based on them. We are doing some calculations etc in the business layer to build these objects, so if we could re-use, that would be best.
Thanks!

View 2 Replies View Related

Create A Table Of Contents Based On Report Items From A List Control

Apr 28, 2008

What are the options to create a table of contents based on the report items in a List Control? Document Mapping works for online viewing. A table of content would make the report easier to read when it's printed.

Any help is much appreciated. Thanks.

View 1 Replies View Related

SSRS 2005 - Email Report On Execution To Dynamic List With Dynamic Parameters = No Schedule

Nov 23, 2007

Hi,
I have a need to display on screen AND email a pdf report to email addresses specified at run time, executing the report with a parameter specified by the user. I have looked into data driven subscriptions, but it seems this is based on scheduling. Unfortunately for the majority of the project I will only have access to SQL 2005 Standard Edition (Production system is Enterprise), so I cannot investigate thoroughly.

So, is this possible using data driven subscriptions? Scenario is:

1. User enters parameter used for query, as well as email addresses.
2. Report is generated and displayed on screen.
3. Report is emailed to addresses specified by user.

Any tips on how to get this working?

Thanks

Mark Smith

View 3 Replies View Related

Retrieve Fields List From A Published Report Data Model Published On The Reporting Server.

Jul 17, 2007

Can someone please tell me how to retrieve/query the list of fields from an entity of a report data model that has been published on the reporting server programmatically ?

I am trying to upload a report data model to the reporting server and planning to use that model as the data source and consume it through our existing web application?

Thank you ,

Rashid A. Khan

View 1 Replies View Related

Report - Tables Inside A List Side By Side

Apr 3, 2008

All,

I was trying to do something like puting two tables side-by-side inside a list, and list itself is grouped by a field.
But for some reason, two tables are not organzied pararally even there is no page break inserted.

Please help. Tks in advance.

Alex

View 1 Replies View Related

SQL 2012 :: List All Different Values That Go With Single CAS ID To Appear As Comma Separate List

Jun 15, 2015

So at the moment, I don't have a function by the name CONCATENATE. What I like to do is to list all those different values that go with a single CASE_ID to appear as a a comma separate list. You might have a better way of doing without even writing a function

So the output would look like :

CASE_ID VARIABLE
=====================
1 [ABC],[HDR],[GHHHHH]
2 [ABCSS],[CCHDR],[XXGHHVVVHHH],[KKKJU],[KLK]

SELECT
preop.Case_ID,
dbo.Concatenate( '[' + CAST(preop.value_text AS VARCHAR) + ']' ) as variable
FROM
dbo.TBL_Preop preop
WHERE
preop.Deleted_CD = 0

GROUP BY
preop.Case_ID

View 8 Replies View Related

Insert Value List Doest Not Match Column List

Apr 18, 2007

HI...



I need to do a simple task but it's difficult to a newbie on ssis..



i have two tables...



first one has an identity column and the second has fk to the first...



to each dataset row i need to do an insert on the first table, get the @@Identity and insert it on the second table !!



i'm trying to use ole db command but it's not working...it's showing the error "Insert Value list doest not match column list"



here is the script



INSERT INTO Address(
CepID,
Street,
Number,
Location,
Complement,
Reference)Values
(
?,
?,
?,
?,
?,
?
)
INSERT INTO CustomerAddress(
AddressID,
CustomerID,
AddressTypeID,
TypeDescription) VALUES(
@@Identity,
?,
?,
?
)



what's the problem ??

View 7 Replies View Related

Items In List A That Don't Appear In List B (was Simple Query...I Think)

Jan 20, 2005

Ok, I want to write a stored procedure / query that says the following:
Code:
If any of the items in list 'A' also appear in list 'B' --return false
If none of the items in list 'A' appear in list 'B' --return true


In pseudo-SQL, I want to write a clause like this

Code:

IF
(SELECT values FROM tableA) IN(SELECT values FROM tableB)
Return False
ELSE
Return True


Unfortunately, it seems I can't do that unless my subquery before the 'IN' statement returns only one value. Needless to say, it returns a number of values.

I may have to achieve this with some kind of logical loop but I don't know how to do that.

Can anyone help?

View 3 Replies View Related

Select List Contains More Items Than Insert List

Mar 21, 2008

I have a select list of fields that I need to select to get the results I need, however, I would like to insert only a chosen few of these fields into a table. I am getting the error, "The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns."
How can I do this?

Insert Query:
insert into tsi_payments (PPID, PTICKETNUM, PLINENUM, PAMOUNT, PPATPAY, PDEPOSITDATE, PENTRYDATE, PHCPCCODE)
SELECT DISTINCT
tri_IDENT.IDA AS PPID,
tri_Ldg_Tran.CLM_ID AS PTicketNum,
tri_ClaimChg.Line_No AS PLineNum,
tri_Ldg_Tran.Tran_Amount AS PAmount,

CASE WHEN tln_PaymentTypeMappings.PTMMarsPaymentTypeCode = 'PATPMT'
THEN tri_ldg_tran.tran_amount * tln_PaymentTypeMappings.PTMMultiplier
ELSE 0 END AS PPatPay,

tri_Ldg_Tran.Create_Date AS PDepositDate,
tri_Ldg_Tran.Tran_Date AS PEntryDate,
tri_ClaimChg.Hsp_Code AS PHCPCCode,
tri_Ldg_Tran.Adj_Type,
tri_Ldg_Tran.PRS_ID,
tri_Ldg_Tran.Create_Time,
tri_Ldg_Tran.Adj_Group,
tri_Ldg_Tran.Payer_ID,
tri_Ldg_Tran.TRN_ID,
tri_ClaimChg.Primary_Claim,
tri_IDENT.Version
FROM [AO2AO2].MARS_SYS.DBO.tln_PaymentTypeMappings tln_PaymentTypeMappings RIGHT OUTER JOIN
qs_new_pmt_type ON tln_PaymentTypeMappings.PTMClientPaymentDesc =
qs_new_pmt_type.New_Pmt_Type RIGHT OUTER JOIN
tri_Ldg_Tran RIGHT OUTER JOIN
tri_IDENT LEFT OUTER JOIN
tri_ClaimChg ON tri_IDENT.Pat_Id1 =
tri_ClaimChg.Pat_ID1 ON tri_Ldg_Tran.PRS_ID =
tri_ClaimChg.PRS_ID AND
tri_Ldg_Tran.Chg_TRN_ID =
tri_ClaimChg.Chg_TRN_ID
AND tri_Ldg_Tran.Pat_ID1 = tri_IDENT.Pat_Id1 LEFT OUTER JOIN
tri_Payer ON tri_Ldg_Tran.Payer_ID
= tri_Payer.Payer_ID ON qs_new_pmt_type.Pay_Type
= tri_Ldg_Tran.Pay_Type AND
qs_new_pmt_type.Tran_Type = tri_Ldg_Tran.Tran_Type
WHERE (tln_PaymentTypeMappings.PTMMarsPaymentTypeCode <> N'Chg')
AND (tln_PaymentTypeMappings.PTMClientCode = 'SR')
AND (tri_ClaimChg.Primary_Claim = 1)
AND (tri_IDENT.Version = 0)

View 2 Replies View Related

Insert Only New Items From A List But Get ID's For New And Existing In The List.

Feb 12, 2008

Hi,

I have a a table that holds a list of words, I am trying to add to the list, however I only want to add new words. But I wish to return from my proc the list of words with ID, whether it is new or old.

Here's a script. the creates the table,indexes, function and the storeproc. call the proc like procStoreAndUpdateTokenList 'word1,word2,word3'

My table is now 500000 rows and growing and I am inserting on average 300 words, some new some old.

performance is a not that great so I'm thinking that my code can be improved.

SQL Express 2005 SP2
Windows Server 2003
1GB Ram....(I know, I know)

TIA





Code Snippet
GO
CREATE TABLE [dbo].[Tokens](
[TokenID] [int] IDENTITY(1,1) NOT NULL,
[Token] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
CONSTRAINT [PK_Tokens] PRIMARY KEY CLUSTERED
(
[TokenID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_Tokens] ON [dbo].[Tokens]
(
[Token] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = ON, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE FUNCTION [dbo].[SplitTokenList]
(
@TokenList varchar(max)
)
RETURNS
@ParsedList table
(
Token varchar(255)
)
AS
BEGIN
DECLARE @Token varchar(50), @Pos int
SET @TokenList = LTRIM(RTRIM(@TokenList ))+ ','
SET @Pos = CHARINDEX(',', @TokenList , 1)
IF REPLACE(@TokenList , ',', '') <> ''
BEGIN
WHILE @Pos > 0
BEGIN
SET @Token = LTRIM(RTRIM(LEFT(@TokenList, @Pos - 1)))
IF @Token <> ''
BEGIN
INSERT INTO @ParsedList (Token)
VALUES (@Token) --Use Appropriate conversion
END
SET @TokenList = RIGHT(@TokenList, LEN(@TokenList) - @Pos)
SET @Pos = CHARINDEX(',', @TokenList, 1)
END
END
RETURN
END
GO

CREATE PROCEDURE [dbo].[procStoreAndUpdateTokenList]
@TokenList varchar(max)
AS
BEGIN
SET NOCOUNT ON;
create table #Tokens (TokenID int default 0, Token varchar(50))
create clustered index Tind on #T (Token)
DECLARE @NewTokens table
(
TokenID int default 0,
Token varchar(50)
)

--Split ID's into a table
INSERT INTO #Tokens(Token)
SELECT Token FROM SplitTokenList(@TokenList)
BEGIN TRY
BEGIN TRANSACTION
--get ID's for any existing tokens
UPDATE #Tokens SET TokenID = ISNULL( t.TokenID ,0)
FROM #Tokens tl INNER JOIN Tokens t ON tl.Token = t.Token

INSERT INTO Tokens(Token)
OUTPUT INSERTED.TokenID, INSERTED.Token INTO @NewTokens
SELECT DISTINCT Token FROM #Tokens WHERE TokenID = 0

return the list with id for new and old
SELECT TokenID, Token FROM #Tokens
WHERE TokenID <> 0
UNION
SELECT TokenID, Token FROM @Tokens
COMMIT TRANSACTION
END TRY
BEGIN CATCH
DECLARE @er nvarchar(max)
SET @er = ERROR_MESSAGE();
RAISERROR(@er, 14,1);
ROLLBACK TRAN
END CATCH;
END
GO




View 5 Replies View Related

Post To A DB

May 25, 2006

Alright so here is what I am trying to do.
I have a form that someone fills out it has a text box as title, and a drop down box that is a category, and then a text area that is for their explanation.
On the back end I am using a stored procedure called sp_store_bkm. When I execute this it works just fine and puts the data that I put in it into the to table below is the  Stored procedure code:
ALTER PROCEDURE sp_store_bkm @oID nvarchar OUTPUT, @oTitle nvarchar(50),  @oCategory nvarchar(50), @obkmtext nvarchar(MAX)
 AS BEGIN INSERT INTO tbl_bkms(Title, Category, bkmtext) VALUES(@oTitle, @oCategory, @obkmtext)Set @oID=  SCOPE_IDENTITY() END
 
Now on my front end it comes up with an error in the lower left (erros on page). When I click on the error for details it seems like it is coming fromt he connection string. I cant find anything wrong with the connection string. Below is my code for the aspx page.
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script>
function Submit2_onclick() {
Dim Connection As SqlConnection = "server=localhost;Database=BKM.mdf;integrated security=SSPI;"        connection.Open()        Try            Dim command As SqlCommand = New SqlCommand("sp_store_bkm", connection)             command.CommandType = CommandType.StoredProcedure            Dim oID As New SqlParameter("@oID", SqlDbType.Int)            oID.Direction = ParameterDirection.Output             command.Parameters.Add(oID)            command.Parameters.Add("@oTitle", title.text)            command.Parameters.Add("@oCategory", category.text)            command.Parameters.Add("@obkmtext", bkmtext.text)            command.ExecuteNonQuery()             Dim sOrderID As String = oID.Value }</script>
<form method="post">    <table cellpadding="10" style="width: 100%">        <tr>            <td style="width: 100px">                <span style="font-size: 10pt; font-family: Verdana">                Login ID:                     <br />                </span>                <asp:LoginName ID="LoginName1" runat="server" Font-Names="Verdana" Font-Size="10pt" ForeColor="Red" />                <span style="font-size: 10pt; font-family: Verdana">                <br />                <br />                Title:<br />                </span>                <input id="title" style="width: 374px" type="text" /><br />                <br />                <span style="font-size: 10pt; font-family: Verdana">                Category:<br />                </span>                <select id="Category" name="D1" size="1" language="javascript" onclick="return Select1_onclick()">                    <option selected="selected">Office Applications</option>                    <option>VPN</option>                    <option>WLAN</option>                </select>                &nbsp; &nbsp;                &nbsp; &nbsp;<br />                <span style="font-size: 10pt; font-family: Verdana">                    <br />                Your BKM<br />                </span>                <textarea id="bkmtext" style="width: 378px; height: 196px"></textarea><br />                <br />                &nbsp;<input id="Reset1" type="reset" value="reset" />                &nbsp; &nbsp; &nbsp;<input id="Submit2" type="submit" value="submit" language="javascript" onclick="return Submit2_onclick()" /></td>        </tr>    </table>    </form></asp:Content>
 
Please help.

View 3 Replies View Related

HELP !!!!!! (just Below This Post)

Jul 12, 2001

Can you help me? I'm pointing on the thread just below this post (along with the other messages on the message board).

View 1 Replies View Related







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