Reading Xml Document Using Procedure

Oct 8, 2007

hi all,

I need a built-in function which is given output of xml node value when i am sending a parameters ... xml document and node name.
example :

xml document
<employee>
<eno> 1 </eno>
<ename> dddd </ename>
<salary> 10000 </salary>
</employee>

I will give this xml document and node name (for eg: ename) to buil-in function. I want output 10000.

any built -in function like ... in mssql 2000.



Thanks&Regards,

Msrs

View 3 Replies


ADVERTISEMENT

Reading Stored Procedure In Asp.net 2.0

Nov 30, 2007

Hi, I'm having a difficult time getting the result from a stored procedure, where the result is stored in a dataset, and then displayed in a gridview.  I have the following code:  //SqlConnection conn = new SqlConnection("Data Source=GTS-02;Initial Catalog=Victor;User ID=name;Password=.pass"); string conn = System.Configuration.ConfigurationManager.AppSettings.GetValues("ConnectionString")[0]; SqlConnection m_dbConn = null; SqlCommand sqlCmd = new SqlCommand(); DataSet dsTest = new DataSet();

m_dbConn = new SqlConnection(conn); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd = new SqlCommand("TESTME", m_dbConn); SqlParameter parmParam1 = new SqlParameter("@Param1", TextBox2.Text); sqlCmd.Parameters.Add(parmParam1); m_dbConn.Open(); SqlDataAdapter sqlDataIn = new SqlDataAdapter(sqlCmd); sqlDataIn.Fill(dsTest, "Result");

GridView1.DataSource = dsTest.Tables["Result"]; GridView1.DataBind(); m_dbConn.Close();I can see through debugging that I'm connected to the sql database, but I'm not able to retrieve the result from the stored procedure.  Any advice would be greatly appreciated! DZ 

View 1 Replies View Related

Reading Stored Procedure Output

Apr 17, 2007

Hi all,



I've been wrestling with something for quite some time, and can't seem to get anything figured out. I'd appeciate some guidance.



I have adopted a couple of different approaches, but have been unable to get any of them to yield the information I'm looking for. In essence, I want to use the output of a Reporting Service report for archiving in another database. I have attempted to use the Reporting Services web service to achieve this, but got absolutely nowhere.



Today, I have created a stored procedure which mimics the behaviour of my report and have tried to use SSIS to read the result set from this stored procedure via both a DataReader Source and an OLE DB source. The problem is that the SP takes 4 parameters, and for the life of me it seems impossible to get these parameters down to the SP in a way that SSIS can parse and generate the columns.



I've reached a dead end in terms of my own knowledge. Has anyone done anything like this before and could advise me on the best way to achieve it? Do my aims even make sense, or do I need to rethink the process of using this kind of data?



At this stage, any help would be very much appreciated. Many thanks...

View 10 Replies View Related

Reading Values Returned From A Stored Procedure

Nov 10, 2000

I am trying to use a stored procedure inside the scripter in a site server pipeline. Can anyone tell me how the scripter will read the the result which is a variable. The stored procedure is returning the right value when run in query analyzer but I don't know how to retrieve it inside the pipeline.

Thank you
JG

View 1 Replies View Related

Reading An OUTPUT Parameter From A Stored Procedure Into A Variable

Oct 2, 2007

Hello,
I am struggling with this, having read many msdn articles and posts I am non the wiser. I have a sproc with an output parameter @regemail. I can call the sproc OK from my code as below, via a tableadapter. And the sproc works as desired from management studio express. I want to get the result returned in the OUTPUT parameter (NOT the Return Value) and place it in a variable. Can anyone advise how I can do this? J.
THE CODE I USE TO CALL THE SPROC
Dim tableAdapter As New DataSet1TableAdapters.RegistrationTableAdaptertableAdapter.SPVerifyUser(strRegGuid, String.Empty)
 THE STORED PROCEDURECREATE Proc [prs_VerifyUser
 @regid uniqueidentifier,@regemail nvarchar(250) OUTPUT
ASBEGIN
IF EXISTS(SELECT RegEmail from dbo.Registration WHERE RegID = @regid)
BEGIN
SELECT @regemail = RegEmail FROM Registration WHERE RegID = @regid
Return 1
END
Return 2
END

View 4 Replies View Related

Returning And Reading Multiple Select Statements From One Stored Procedure

Dec 3, 2006

Hey Guys. I’m having a little trouble and was wondering if you could help me out. I’m trying to create a custom paging control, so I create a stored procedure that returns the appropriate records as well as the total amount of records. And that works fine. What I’m having problems with is reading the data from the second select statement within the code. Anyone have any idea on how to do this? Also.. how can I check how many tables were returned?
Here's my code. I'm trying to keep it very generic so I can send it any sql statement:public DataTable connect(string sql)
{
DataTable dt = new DataTable();

SqlConnection SqlCon = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["MyDB"].ToString());
SqlDataAdapter SqlCmd = new SqlDataAdapter(sql, SqlCon);
System.Data.DataSet ds = new System.Data.DataSet();
SqlCmd.Fill(ds);

dt = ds.Tables[0];

//Here's where I don't know how to access the second select statement

return dt;
}  Here's my stored procedure:
 ALTER PROCEDURE dbo.MyStoredProcedure
(
@Page int,
@AmountPerPage int,
@TotalRecords int output
)

AS


WITH MyTable AS
(

Select *, ROW_NUMBER() OVER(ORDER BY ID Desc) as RowNum
From Table
where Deleted <> 1
)


select * from MyTable
WHERE RowNum > (((@Page-1)*@AmountPerPage)) and RowNum < ((@Page*@AmountPerPage)+1);

Select @TotalRecords = COUNT(*)
from Table
where Deleted <> 1
RETURN

Thanks

View 3 Replies View Related

Calling An SQL Server 2005 Stored Procedure Within Microsoft Access And Reading Values

Jan 14, 2008

Goodday.

I have finally been able to create a connection from Access to the SQL 2005 Server and was able to call a stored proc (in Server) in the following way





Code Block
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset

cnn.ConnectionString = "Provider='sqloledb'; Data Source='Private';" & _
"Initial Catalog='DBName';Integrated Security='SSPI';"

cnn.Open

cmd.ActiveConnection = cnn
cmd.CommandText = "sp_DefaultEntityData"
cmd.CommandType = adCmdStoredProc

Set rst = cmd.Execute


rst.MoveFirst
Do While Not rst.EOF
lstEntity.AddItem (rst.Fields(0)), 0
'lstEntity.AddItem (rst.Fields(1)), 1
rst.MoveNext
Loop






The Stored Proc is as follow:




Code Block
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go

ALTER PROCEDURE [dbo].[sp_DefaultEntityData]
AS
BEGIN

SET NOCOUNT ON;

SELECT tblEntities.[Name], tblEntities.PrimaryKey
FROM tblEntities
ORDER BY tblEntities.PrimaryKey;

END






The table contains 24 entries

As you can see in the VB code, I am trying to read the returned "table" into an Access ListBox. The listbox should display the entities Name but not the Primary key, but the primary key should still be "stored" in the to so that it can be used to access other data.

I have moved the tables from Access to SQL Server 2005, and would also like to port all the sql queries to sp's in SQL Server. The old way for populating the listbox was a direct SQL query in the RowSource property field. I have tried to set the lstEntity.RowSource = rst but it did not work.

Here are my Q's:
1) As what does the SP return when it is called and is there a better way to catch it than I am doing at the moment?
2) How do I read the values into the listbox, without displaying the primary key in die box?

Thank you in advance!
Any help is very much appreciated.

View 2 Replies View Related

Document Map Not Going Anywhere

May 20, 2008

Hi All ,

I have a matrix table which has two groups in the columns

I am trying to create a multileveled document map which i have succeed by

1. Edit Group 1 properties and setting the document map properties to the name of the field
2. Edit Group 2 properties and setting the document map properties to the name of this field and making the parent group the name of Group 1

The document map appears with the correct groups and name , however when I click on the values it doesnt take me to any where !!! It refreshes the screen but it doesnt go anywhere !

Can someone please help me troubleshoot this or know what i may be missing

thanks

View 1 Replies View Related

Getting Rid Of A Document Map

Sep 8, 2007

When i publish a report to our reporting services site, it comes with a document map that I cannot seem to get rid of and is really annoyong to users. How do I stop this from happening and appearing?

View 1 Replies View Related

Sql Ce Help Document

Sep 29, 2007

Is there has some standalone help file about sql ce except the Sqlce online document or in MSDN?

View 4 Replies View Related

How Can I Document My Sql Server Db

Dec 8, 2007

I have only Management Studio Express, is there a way to document my database?

View 3 Replies View Related

Document Storage

Dec 23, 2003

Hello Everyone and thanks for your help in advance. I am developing a document storage application for an intranet that will store various Word, Excel, and PDF documents. Most of the examples I see utilize SQL Server and an image field rather than the FileSystem Object to store documents. My concern with this method is that some of the documents may be several hundred pages (not exactly sure of the actual file size yet, but they must be fairly large). My question is, where does the use of SQL Server become impractical for this type of application? Any insight would be greatly appreciated. Thanks.

View 1 Replies View Related

SQL Performance Document

Sep 10, 1998

Hi everyone,

Has anyone seen this white paper below? If yes, can someone point me to the right direction. I can`t find it anywhere in the msdn.microsoft.com/developers. I got this info from the Winnt mag.

------
Microsoft`s Henry Lau has prepared an awesome 49-page quick reference that helps you configure SQL Server 6.5 for maximum performance and troubleshoot poor performance. Here`s the outline:

Introduction
Top Performance Items to Review for Initial SQL Server Configuration
More on Memory Tuning
Understanding the Functions of LazyWriter, Checkpoint, and Logging
Read-Ahead Manager
Disk I/O Performance
Clustered Indexes
Nonclustered Indexes
Covering Indexes
Index Selection
RAID
Creating as Much Disk I/O Parallelism as Possible
Tips for Using ShowPlan
Tips for Using Windows NT/SQL Performance Monitor
Monitoring Processors
Disk I/O Counters
Tips for Using SQLTrace
Tempdb in RAM?
Deadlocking
Join Order Importance
SQL to Avoid If at All Possible
Use ShowPlan to Detect Queries That Are Not Using Indexes
Smart Normalization
A Special Disk I/O Tuning Scenario: EMC Symmetrix
Some General Tips for Performance Tuning SQL Server
References

Download this gem from msdn.microsoft.com/developer

View 1 Replies View Related

Document Search For CMS

Dec 28, 2006

I have a database which stores documents (e.g. policies and guidelines)in our content management system. The follow relationships exist:Documents (1-to-Many) LinkTableKeywordLink (Many-to-1) KeywordsDocuments (1-to-Many) LinkTableAttachments (Many-to-1) AttachmentsDocuments (1-to-Many) LookUpSubjectsDocuments (1-to-Many) LookUpDocTypeWhen the user conducts a search I want the SQL to check if the stringthey enter is present in:* the Title, Author, Summary fields of Documents OR* the Title or Path of the Attachments* the Keywords that are links OR* the Subject that is linked OR* the DocType that is linked.Is this possible in one SQL query. I have tried the following:SELECT DISTINCT Documents.Document, Documents.Title,PriorityFROM Documents,Attachments,Keywords,LinkTableAttachments,LinkTabl eKeywordLinkWHERE((Documents.Document=LinkTableAttachments.Document ID andLinkTableAttachments.AttachmentID=Attachments.Id) OR(Documents.Document=LinkTableKeywordLink.DocumentI D andLinkTableKeywordLink.KeywordID=Keywords.Id))AND (Documents.Title Like '%SEARCHSTRING%' OR Documents.Author Like'%SEARCHSTRING%' OR Documents.Summary Like '%SEARCHSTRING%' ORKeywords.Keyword Like '%SEARCHSTRING%' OR DocType.DocType Like'%SEARCHSTRING%' OR Attachments.AttachmentTitle Like '%SEARCHSTRING%'OR Attachments.Path like '%SEARCHSTRING%' or Subjects.Subject Like'%SEARCHSTRING%')AND StartDate<=getDate() and ReviewDate>getDate() order by Titlebut this causes, perhaps understandably, a timeout error.Any thoughts?Thanks!Steve

View 4 Replies View Related

DTS Document Or Ebook

Jul 20, 2005

Hi,I need deep knowledge about DTS tasks. Can anyone send me an e-book orrelated document about DTS packages. (Links on the Internet site aregenerally advertisement or not working links).Thanks,Veysel Can Demir

View 3 Replies View Related

Document Map Label

May 23, 2007

I have a Report that has a document map Label in the Report which I need to remove.
However as the report has over 50 text-boxes I am having difficulty locating it.
I have had a look at the XML but that does not seem to indicate the offending text box.
Any advice would be greatly appreciated.


Regards

JohnJames

View 1 Replies View Related

Jump To Document Map

May 9, 2008

When you use the Jump to Report feature is there a way to also go to a specific document map link?

View 5 Replies View Related

IE 7 And Document Map Is Blank

Jan 19, 2007

All,


I have a report with a document map and when I run the report through
IE 7.0, the Document Map is blank. Running that same report through IE
6.0 and it is fine.


Both instances are run against the same server via Report Viewer so
there is no difference other than the client IE version.


Anyone know of a work around for this?


Thanks,
Sherry

View 1 Replies View Related

Subscription For A Document

Mar 14, 2007

Besides reports we also have some documents that have been uploaded to Report Manager. Is there a way that we could set a subscription for a document? I currently do not see one.

View 4 Replies View Related

Document Map Formatting

Jun 14, 2007

Does anyone know if it is possible to control the formatting of the Document Map in SSRS? I would like to set the background color if possible.

View 5 Replies View Related

IE7 And SSRS Document Map

Nov 28, 2006

The contents of document maps do not appear since I upgraded to IE7. They still appear for users on IE6.

Reporting Services version is SQL2000.

Have looked all over - this problem has been reported in a number of places but there seems to be no response / fix / work-around from MS.

Can anyone help or at least comment?

View 14 Replies View Related

Size Of Document Map

Jun 13, 2007

Hi,

Does anyone know if it is possible to specify the size of a document map in a report? Ot it's scroll bar?

I have a report that contains about 100+ groups and therefore 100+ items in the document map. On initial display of the report, about 25 groups are visible in the document map, and you can see that there is more data below (half a row is shown) but the scroll bar does not allow scrolling all the way to the bottom of the list.

Thanks.

View 1 Replies View Related

How To Removing Document Map

Jan 30, 2007

I add document map to my report but I forgot

how can I remove it

thanks!

View 4 Replies View Related

Where Can I Download MS SQL 2005 Help Document?

Oct 6, 2006

Where can I download MS SQL help document? Thanks!

View 2 Replies View Related

Search Within Word Document

Mar 2, 2007

Hi ,I would like to whether its possible or not.I have stored word document(Resume) in SQL server. Now i want to search for particular key word.for example . I want to list down all details of candidate which have ASP.Net mentioned in their resume. So please provide me any link / or article .     

View 1 Replies View Related

Creating A Word Document

Mar 20, 2008

We are facing an issue while creating a word document through BCP utility of MS SQL Server 2005.
Ours is the Survey application where there could be various Respondents with different languages who can receive a Questionnaire through mail. Now the requirement is to send the Questionnaire in Word Document which would look like a form having Radio buttons, check boxes and images etc. controls.
To achieve this we have written a Stored procudure in MS SQL Server 2005. In this Stored procedure, we are writing an HTML Code in formatted manner and at the end using BCP utility we create a word document in specific folder. Then we attach the document from that folder in mail using sp_sendmail of MS SQL server 2005 and send it to the Respondent of the Survey.
1> The issue we are facing here is when the Respondent receives the mail and opens the word attachment, it opens the document in designer mode where controls(Radio Button and check boxes) are not clickable. Hence Respondent is not able to fill in the document as a form. However Respondent has to click on 'Exit Designer' button in the menu to make it as interactive form. The requirement is when Respondent opens the Word document it should directly open as Interactive form rather that clicking on 'Exit Desinger' button on menu.
2> Secondly when we create a word document, there are some images that need to be shown as seen below. As of now, in HTML code we have given a path of the Web Server as '<http:WebServerIP/images'. However we would like to know whether there is any way to Embed the images directly in the Word Document rather than referancing them from the Web server path.

View 2 Replies View Related

Document Management Oracle V. SQL 7

Mar 14, 2000

I am interested in storing millions of documents in a database. It appears that Oracle has a better selection of document management tools including a search engine than does SQL 7.

Any comments, suggestions, reviews, and/or white papers regarding this issue would be greatly appreciated.

Regards,
Steve Marsh

View 1 Replies View Related

Saving A WORD Document...

Oct 23, 2003

I am trying to save an MS WORD document... What Data type should I use?

I know in Sybase we used BLOB...

View 1 Replies View Related

Document Management Systems

Jun 5, 2006

I have a client that would like to archive all of the documents .word, .xls, .pdf, .jpg, email coorespondance, etc. into some sort of database so in the near future when the project starts up again all of the information is in a clear consise format. I was hoping that this forum could provide some guidance in selecting a software package and a discussion on how to proceed.

I have 6 gigs of documents in a folder on our server.
I was planning on delivering the organized data on a external hard drive after putting the data into some sort of database.
I would like to include metadata about each particular document.
like
who created the document,
Key words about the document's purpose,
time frame the document is revelant for,
and so on.

I would like to use a database structure and possibly hot link the document to the DB.
I would like to use xml (if possible) for the metadata.

any help is greatly appreciated on this
I can be reached at

khively at maximusa dot com

for any additional questions

View 3 Replies View Related

Generating Document From Comments In Sql

Sep 4, 2005

hai everyone
i have a requirement.
i am writing a very large sp.
i have written many comments in that sp.
i wanted to generate a document from that comments i have wriiten in that sp.
i know a similar thing can be done in vb.net comments.
is it possible top do such a thing in .sql file.

ie
all comments that i have wriiten in my .sql file should be extracted.
to a document.

View 5 Replies View Related

Sample Document On Arrays?

Feb 21, 2008

I'm newer to MS SQL, but have a programming background, so I'm going to try to describe what I'm doing in that sense.

What I want to do is pull an entire column of data from one table, and insert it into a column in another table. Typically, I would do this with an array and while loop or something similar. I've figured out how to do a while loop in SQL, but the array situation has me stumped. I tried reading http://weblogs.sqlteam.com/jeffs/archive/2007/06/26/60240.aspx that article, however it referred to a procedure, and I have no background or experience with procedures.

Any sort of idea or document on a technique to do this would be most appreciated, thank you!

View 15 Replies View Related

Utility To Document Database

Feb 27, 2008

Is there any utility that can document some sql server 2005 tables that I have in my database?I mean to add some description to column names so that I can know what they represent.Thank you!

View 3 Replies View Related

Printing A Word Document From T SQL

Jul 23, 2005

hi i was trying to print a word document from a stored prcedure usingthe following two methods1)cd C:&&"C:Program FilesMicrosoft OfficeOFFICE11winword.exe""c: emp.doc" /mfileprint"/mfileprint" - this macro contains the code to print the word documentand exit the word , this command runs fine when i run it at the commandprompt but when running from query analyzer i can see the job in theprinter queue but it will never finish and i need to kill the wordmanually to stop the query analyzer to finish.2)declare @hr int, @object intExec @hr = sp_OACreate 'Word.Application', @Object OUTPUTexecute sp_OAMethod @Object, 'PrintOut' ,@filename:='C: emp.doc'etc........Thank you

View 2 Replies View Related







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