Dataset && Primary Key Generation Problem
Oct 10, 2005
Hi Everyone, I have been developing client server application using VC++.NET & SQL Server 2000. Now I installed my SQL Server in Windows Server 2003 & Windows XP client machine. The connection between the SQL Server & Client is working well. But I have a problem while executing my application which is developed for user entry. When I adding a new row the each machine generating the same primary key value in my dataset but the real primary key value storing in the database is correct. Why these problem? Can someone help me? Thanks in Advance Jose
View 2 Replies
ADVERTISEMENT
Sep 13, 2006
I am trying to use the results of a query to build an XML file (this will eventually be data from a number of RDBMS's and will undergo transformations and unions prior to being saved as a package variable).
I have saved the results of my query to a result set variable (ADOResultSet) using the Recordset Destination.
I then try to use a script task to read the variable and create an XML file. I get a runtime error Unable to cast COM object of type 'System.__ComObject' to class type 'System.Data.DataSet'.
Public Sub Main()
'MsgBox(Dts.Variables("ADORecordSet").Value.ToString)
Dim mySet As DataSet
mySet = (CType(Dts.Variables("ADORecordSet").Value, DataSet))
mySet.WriteXml("C: est.xml", XmlWriteMode.WriteSchema)
Dts.TaskResult = Dts.Results.Success
End Sub
I am very unfamiliar with Visual Basic and am unsure of how to cast the COM object to a DataSet. Do I need to marshal the COM object?
Thanks
View 2 Replies
View Related
Jan 18, 2008
Hi,
I have an issue in generating the report in sql reporting services. I need to display a report in a table format. The datas of the table should be from two different sql tables. I have tried to write a stored procedure that returns two result sets from two different tables. As reporting services takes datas only from the first result set, i tried to write two different stored procedures each displays one result set. Then i have created two datasets with that two different stored procedure. Even then i cannot proceed as i was not able to use two different dataset in a single table because i was setting the datasetname to one dataset, when i try to retrieve the fields from another dataset i was able to retrieve only first and count values. Then i tried using sub reports. As sub reports for a dataregion(table) repeats for every row of the main report i was not able to fetch the correct datas. Atlast i have tried combining the query using join and wrote a single stored procedure. This stored procedure returns a single result set retrieves data from two tables satisfying the conditions. The issue i am facing with this is, the first table has only one row satisfying the condition and the second table has three rows satisfying the same condition, as i am using join query for the three rows returned by the second table the first table datas are getting duplicated for the rest of the rows in the second table. As I found using join query is the only resolution for the output which I need, and also I have to avoid the duplication of the records. Hence let me know for any solutions.
I have shown the sample datas that is duplicating which is indicated as bold. Phonenumber, Attemptdate and calloutcome are from first table and start time and endtime is from second table. As there are three different datas for the second table, first table datas are duplicated
Phone Number
Attempt Date
Call OutCome
Start Time
End Time
843-577-0800
2007-09-10 15:20:00.000
Contact with Prospect - Expressed Interest
15:08
15:12
843-577-0800
2007-09-10 15:20:00.000
Contact with Prospect - Expressed Interest
15:25
15:25
843-577-0800
2007-09-10 15:20:00.000
Contact with Prospect - Expressed Interest
15:26
15:27
Thanks for any help in advance
Thanks,
Sangeethaa
View 3 Replies
View Related
May 26, 2015
I have a report with multiple datasets, the first of which pulls in data based on user entered parameters (sales date range and property use codes). Dataset1 pulls property id's and other sales data from a table (2014_COST) based on the user's parameters. I have set up another table (AUDITS) that I would like to use in dataset6. This table has 3 columns (Property ID's, Sales Price and Sales Date). I would like for dataset6 to pull the Property ID's that are NOT contained in the results from dataset1. In other words, I'd like the results of dataset6 to show me the property id's that are contained in the AUDITS table but which are not being pulled into dataset1. Both tables are in the same database.
View 0 Replies
View Related
Oct 1, 2015
I have a small number of rows in a dataset, Table 1. There is a CLOB on a large dataset, Table 2. They join on a PK. I would like to retrieve this CLOB and add it to the data flow for Table1. In short I want to emulate the following:
Table 1:Â Small table without CLOB, 10 rows.Â
Table 2: Large table with CLOB, 10,000,000 rows
select CLOB
from table2
where pk = (select pk from table1)
I want this to return the CLOBs for the small number of rows in Table 1. The PK is indexed obviously so it should be a fast look up.
Table 1 and Table 2 live on different Oracle databases. How do I perform this operation efficiently in SSIS? It seems the Lookup and Merge Join wont do this.
View 2 Replies
View Related
May 27, 2015
I have a report with multiple datasets, the first of which pulls in data based on user entered parameters (sales date range and property use codes). Dataset1 pulls property id's and other sales data from a table (2014_COST) based on the user's parameters.
I have set up another table (AUDITS) that I would like to use in dataset6. This table has 3 columns (Property ID's, Sales Price and Sales Date). I would like for dataset6 to pull the Property ID's that are NOT contained in the results from dataset1. In other words, I'd like the results of dataset6 to show me the property id's that are contained in the AUDITS table but which are not being pulled into dataset1. Both tables are in the same database.
View 3 Replies
View Related
May 21, 2007
I found out the data I need for my SQL Report is already defined in a dynamic dataset on another web service. Is there a way to use web services to call another web service to get the dataset I need to generate a report? Examples would help if you have any, thanks for looking
View 2 Replies
View Related
Oct 12, 2007
Is there any way to display this information in the report?
Thanks
View 3 Replies
View Related
May 7, 2008
Hi,
I have a stored procedure attached below. It returns 2 rows in the SQL Management studio when I execute MyStorProc 0,28. But in my program which uses ADOHelper, it returns a dataset with tables.count=0.
if I comment out the line --If @Status = 0 then it returns the rows. Obviously it does not stop in
if @Status=0 even if I pass @status=0. What am I doing wrong?
Any help is appreciated.
ALTER PROCEDURE [dbo].[MyStorProc]
(
@Status smallint,
@RowCount int = NULL,
@FacilityId numeric(10,0) = NULL,
@QueueID numeric (10,0)= NULL,
@VendorId numeric(10, 0) = NULL
)
AS
SET NOCOUNT ON
SET CONCAT_NULL_YIELDS_NULL OFF
If @Status = 0
BEGIN
SELECT ......
END
If @Status = 1
BEGIN
SELECT......
END
View 4 Replies
View Related
Oct 3, 2000
I have a quick question regarding SQL Server Enterprise Manager. I'm looking at setting up a job to automatically create DDL for a user database. This will be done along with our normal nightly backup routine.
I'm very familiar with using EM to create SQL scripts, but is there anyway to schedule this task? I've considered DTS and some type of scheduled package, but can't seem to find anything similar. I'm thinking I may need a custom task.
Could someone please shed some light on the subject? If not from within EM, how about any third party tools? FYI - I already own the Embarcadero suite and am trying it out wwith that.
Thank You.
Anthony Robinson
View 10 Replies
View Related
Jul 11, 2007
hi
I want to generate excel file which contain table name , column name,datatype ,size
how we can do in sql server
is there any way
pleases tell the steps
View 2 Replies
View Related
Nov 3, 2007
Server:
SQL 2005 SP2 on Win 2003 Ent. SP1
A 3rd part app is requiring that I create a credential, whick in turn requires an SMK be set. When I try to create the credential, I get an error message indicating a decryption error. When I run the alter command to regenerate the key (without force) it throws an error indicating the key cannot be decrypted. According to a KB article I found, this may indicate that a key has never been generated.
My question is, I have a number of production databases in this instance, including SQL Reporting Services. Except for the SRS DB's, all other user db's are simple db's that don't use encryption. If I run the Force command to generate the key, am I going to break anything? I'm really concerned about report servioces.
Thanks.
View 5 Replies
View Related
Apr 28, 2004
I need a tool to generate sql code of database including all data like "insert into table values()". Same as sql file in IBuySpy portal. How can I generate a file like this? I tried with enterprise manager but it doesn't generate insert statements and default values of some fileds lost.
Can someone help me?
View 1 Replies
View Related
Feb 7, 2005
Hello all,
I have a data driven subscription with the information about the file name/file extension/ path etc coming in from a database. The problem is that the subscription status after running tells me that things are done and there is no error but the file is not being generated in the specified directory and for that reason the file is not generated at all anywhere on the hard disk. can anybody please help.
The information in the database for the report is as follows
FileName : Test1
FileExtn : True
Path = \ram\C$Reports
Render_Format = PDF
Username = Administrator
Password = password
Writemode = Overwrite
All the fields are varchar(50) in size.
View 1 Replies
View Related
Dec 5, 2007
Hi,
How to create surrogate key in a dimension table?
What transformations can be used to create it?
View 6 Replies
View Related
Sep 13, 2005
Hi all,I am following the procedure where I generate XMLs of tables and put itin a DataSet and read that dataset back into another database to bewritten into the tables.Although I am VERY close to completion a small problem that I am facingis that the XMLs being generated have as the table name "table" and notthe actual names.Is this a known issue or am I amiss? and, does anyone have a solutionfor this?Thank you.*** Sent via Developersdex http://www.developersdex.com ***
View 1 Replies
View Related
Sep 13, 2005
Hi guys,Apologies Simon for not making it clearer last time. What i am doing isreading a table from the SQL Server 2000 database and using:SQLDataSet.WriteXml(strFileName, XmlWriteMode.WriteSchema);to write to the DataSet. But I realised that when I do that the XML isgenerated correctly, the only error being that<xs:element name="Table"> comes in as the tablename instead of theactual table name.Any suggestions will be appreciated. Thank you.*** Sent via Developersdex http://www.developersdex.com ***
View 1 Replies
View Related
Jul 20, 2005
HelloFor my client, I need to generate reports from the information storedin the database. The client has fixed format forms (on paper e.g. USCustoms forms etc).Will I need to redesign the forms in the application and then show theinformation?Another approach is to scan the forms as image and print theinformation on top of that image, so when it is printed , theinformation will be displayed at the right places.Is there any other way? How is the reporting done if the forms arepre-defined and the information is stored in a databaseThanks for your input
View 1 Replies
View Related
Jan 16, 2006
Hi, I'm trying to use the SK script from Donald Farmers book but the code isn't accepted
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Public Class ScriptMain
Inherits UserComponent
Dim CurrentKey As Integer
Public Overrides Sub PreExecute()
CurrentKey = CInt(Me.Variables.FILCodesSK)
End Sub
Public Overrides Sub Input_ProcessInputRow(ByVal Row As Input0Buffer)
CurrentKey += 1
Row.SurrogateKey = CurrentKey
End Sub
End Class
There is a problem with the use of the overrides on the Input_ProcessInputRow sub should this be renamed?
Cheers, Al
View 1 Replies
View Related
Feb 14, 2007
Hi,
I am working with SQL Server 2005 Reporting Service from few days, though I am
not expert, for some reason I have to run on field without having sound
knowledge of RDL, but need your help, gys. I am using SQL Server Business
Intelligence Development Studio to design report.
Here is the procedure of my work to populate a RDL report
I used a stored procedure for the DataSet of my RDL
Then I drag and drop necessary field to my report layout.
Put required parameters to preview tab and then run report.
This is quite simple, I didn't face any problem with this process, even though
the process may not correct, but working perfect. My problem is
when the stored procedure returns multiple result set. The data tab only
shows the first result set though the SP returns multiple result set, I have
run the SP in the Query Analyzer. I don't want change my stored procedure.
And please give me some suggestions about the best procedure
to develop RDL report in real life.
Please reply me ASAP, it€™s very urgent.
Thank youTareqe
View 1 Replies
View Related
Sep 19, 2006
Hi,
Can any one tell me how can I create auto number (similar feature to MS Access) i.e. autmatic increament by 1 in MS SQL 2005 (without using any script)
View 4 Replies
View Related
Apr 11, 2008
i have two datasets.one dataset have old data from some other database.second dataset have original data from sql server 2005 database.both database have same field having id as a primary key.i want to transfer all the data from first dataset to new dataset retaining the previous data but if old dataset have the same id(primary key) as in the new one then that row will not transfer.
but if the id(primary key) have changed values then the fields updated with that data.how can i do that.
View 4 Replies
View Related
Dec 19, 2006
Hi,
I have two datasets in my report, D1 and D2.
D1 is a list of classes with classid and title
D2 is a list of data. each row in D2 has a classid. D2 may or may not have all the classids in D1. all classids in D2 must be in D1.
I want to show fields in D2 and group the data with classids in D1 and show every group as a seperate table. If no data in D2 is available for a classid, It shows a empty table.
Is there any way to do this in RS2005?
View 2 Replies
View Related
Feb 3, 2005
Does anyone know an efficient method for generating a sequence number in the following form?
Starting with 2 columns
1 2
----
A X
A Y
B X
B Y
B Z
C X
I want to then generate a third column as follows:
1 2 3
-------
A X 1
A Y 2
B X 1
B Y 2
B Z 3
C X 1
The purpose being so that I can easily identify the previous row within a Column1 group. So given column1=A and column2=Y I know that the previous row is Column3 - 1 where column1 = A. Therefore I will be able to join to the previous result of any row within any group quickly for future calculations.
Any ideas? Thanks.
View 10 Replies
View Related
Mar 4, 2006
Hi,
I am using a relation(table) which has a artificial key. I want to use this key as the primary key hence is unique. What datatype is associated with this attribute in MS SQL 2000. How can I generate unique id everytime I add a new record to this table ?
Thanks
-Sudhakar
View 4 Replies
View Related
May 29, 2012
I want to make up a system that I can create barcodes for my students and scan books for checkout. I am using Windows xp and .net winforms to finish the task. But I have no source for doing that. I am also wondering if my HTC sense could be used for scanning.
View 13 Replies
View Related
Jul 25, 2013
I have been working on a Human Resource Management software in C# .NET. In its Employee Attendance module i need to keep records of attendance of all workers for one month in a single table.The problem I encounter is to auto generate an exact copy of the Attendance table after a particular month is finished. How can i accomplish this? I use SQL server 2008.
View 4 Replies
View Related
Jan 25, 2008
Hi,
I have an error table that is to be updated by more than one package.
There is a sequence number generated in the error table. It is generated by using the max value of the previous data present in the table.
When more than one package runs parallely, conflict occurs in generating the sequence number.
How can this be handled?
View 1 Replies
View Related
Mar 24, 2006
Hi.I have a database I need to supply something (I'm assuming a t-sql script..maybe something else is better) to update customer tables with.The operations include mostly changing varchar lengths, though a couple ofcolumns were renamed.I'd like to maybe figure out how to get Enterprise Manager or Query Analyzerto generate the scripts.I can't just send alter table scripts because I'm involving all sorts ofconstraints that have to be disabled/or dropped, the alter made, then havethem enabled/ or re-created.Basically I'm hoping to get the tools to do the rather large amount of workfor me. I'm targetting sql server 2000.Can someone make a knowledgeable suggestion?RegardsJeff Kish
View 4 Replies
View Related
Jul 20, 2005
Hi Everybody,I have a probs with dynamic generation.I am writing the probs======================================create proc testasdeclare @query varchar(500)set @query = 'select * from table'----------------------------------------------declare mycur Cursor for Select * from table |open mycur |----------------------------------------------but instate of above block how can I dynamically generate this query?---------------------------------------declare mycur Cursor for exec (@query) |---------------------------------------Or tell me the way.RegardsArijit Chatterjee
View 2 Replies
View Related
Mar 13, 2008
Hello all,
Say I have a report that is running for a long time and I want to cancel it.
Is there a way to cancel the report generation once we submit the Report Generation Button? If I close my Browser, Am I closing my session in the server side? If server is still churning out the old report and I open another browser to request the same report, I might easily crash the server if the requests for the same report keep growing?
How do I handle or how does SSRs handle this?
Thanks in advance to you all experts..
Phewa Taal
View 9 Replies
View Related
Nov 19, 2015
options for attribute generation. The query:
select 'Delivery' as "@DeliverableName"
,'Path'Â Â Â as "@TargetDirectoryPath"
for xml path('Deliverable'), type
generates the following:
<Deliverable DeliverableName="Delivery" TargetDirectoryPath="Path" />
We are interfacing to a third party package that only accepts single quoted attributes:
<Deliverable DeliverableName='Delivery' TargetDirectoryPath='Path' />
Is there an option which will control the enclosing quotes?
View 3 Replies
View Related
Dec 8, 2005
Is there any way to change the image "Report is being generated" to something else or at least change the location of it. I have a report that is very long and our users have to scroll down to see that. They think the report is frozen when in all reality it is still generating. It is postioning in the center of the page and I want it to position at the top.
View 6 Replies
View Related