Can We Use Details Hard Coded Into Exe Directly In Reports Without Storing In DB
Jul 23, 2005
Dear Reader ,
There are some details <facts>, which can be stored (Hard coded) in exe.
example: Measurement Units and their relations.
Now I want to print the list of those Measurement Units and Relationships between them.
Can we print them directly , without bringing them into Database?
Can we use them and make reports merging details from the Database?
Am using SQL 2000 and VB.Net 2003
SuryaPrakash Patel
--
Message posted via http://www.sqlmonster.com
View 1 Replies
ADVERTISEMENT
Feb 8, 2007
Is it possible to force parameters into the reports so enabling me to force a user id value into every report that is picked up from the list. The user ID is a system value and I don't want end users having any knowledge of it?
Cheers
Darren
View 7 Replies
View Related
Jun 6, 2007
Me.SqlConnection1.ConnectionString = "workstation id=""XXXXXXXX"";packet size=4096;user id=XX;data source=""XXXXXXX"";persi" & _
"st security info=True;initial catalog=manufacturing;password=XXXXX"
What excatly is this statement doing it looks to be creating a trusted connection to a certain workstation?
View 3 Replies
View Related
Feb 24, 2004
Hi there,
The postage and packing scheme being used at the site I'm working on depends on the customer's location.
If they're in the UK they get once scheme and if they're in Ireland they get another. Furthermore, if they're anywhere else they get another scheme.
A customer's country is indicated by a 'countryID' stored in the main customer row in the database. (This ID references a country in the Countries table.)
Thus, I was wondering if it is acceptable to hard code the country pk of the UK and Ireland into the formular which works out the postage and packing?
At present, for a similar issue, I've even hard coded the the pk of UK and Ireland into some Javascript running at the client.
Is it fair design to work with a hard coded pk like this?
Cheers,
View 1 Replies
View Related
Dec 12, 2001
I thought a stored procedure was taking much too long to complete. So, I moved the main query to Query Analyzer and found that when I substituted actual values for variables that my SELECT statement ran in seconds. Just to test, I created DECLARE statements, set the variables equal to the same values, re-ran the SELECT statement and it took over a minute. Even the Execution Plan was much different. Any suggestions?
View 4 Replies
View Related
Mar 27, 2001
Hello I was hoping somebody out there could help me …..
We have a hard-coded application which uses the Sa account with no password. We want to add password to Sa – but when we do get users/DBAs calling us saying the application does not work.
How can we add password to Sa and get the application to work - unfortunately we do not have scripts for the application or know of the whereabouts of the developers.
Any suggestions/ideas – will be greatly appreciated
Cheers
Khalid
View 2 Replies
View Related
Jun 3, 2015
declare @StartTime nvarchar(10)= '12:00'
declare @EndTime nvarchar(10)= '12:45'
declare @Diff time(1) = cast(@EndTime as datetime) - cast(@StartTime as datetime)
How to I use Column names instead of Hard coding variables - e.g. '12:00'
View 9 Replies
View Related
Nov 6, 2014
I want to be able to return the rows from a table that have been updated since a specific time. My query returns results in less than 1 minute if I hard code the reference timestamp, but it keeps spinning if I load the reference timestamp in a table. See examples below (the "Reference" table has only one row with a value 2014-09-30 00:00:00.000)
select * from A where ReceiptTS > '2014-09-30 00:00:00.000'
select * from A where ReceiptTS > (select ReferenceTS from Reference)
View 5 Replies
View Related
Jan 10, 2007
Hi. I've looked all over MSDN, newsgroups and the web but I can't find the answer to a problem that I am having.
The application that I am working on used both transactional and merge replication. I want to avoid hard coding passwords into an application that kicks off the pull replication on the client machine.
The client machines are all using SQL Server 2005 Express. The other machine is running SQL Server Standard. The passwords and login details are specified in the subscription properties in the Management Studio.
A fragment of the code is posted below. The transactional sychronization works fine without having to specify any passwords - however the merge replication does not work if both of the passwords are not specified.
private void SynchButton_Click(object sender, EventArgs e) { // Set up the subscriber connection details. subscriberConnection = new ServerConnection(subscriberName); try { // Connect to the Subscriber. subscriberConnection.Connect(); // Do the transactional subscription synchronisation independantly of the // merge subscription replication. try { transPullSubscription = new TransPullSubscription(subscriptionDbName, publisherName, publicationDbName, transPublicationName, subscriberConnection); // If the pull subscription and the job exists, start the agent job. if (transPullSubscription.LoadProperties() && transPullSubscription.AgentJobId != null) { TransSynchronizationAgent transSyncAgent = transPullSubscription.SynchronizationAgent; transSyncAgent.Synchronize(); } else { } } catch (Exception ex) { } // Do the merge subscription synchronisation independantly of the // transactional subscription replication. try { // Set up the subscription details for the merge subscription (bi-directional data) mergePullSubscription = new MergePullSubscription(subscriptionDbName, publisherName, publicationDbName, mergePublicationName, subscriberConnection); // If the pull subscription and the job exists, start the agent job. if (mergePullSubscription.LoadProperties() && mergePullSubscription.AgentJobId != null) { MergeSynchronizationAgent mergeSyncAgent = mergePullSubscription.SynchronizationAgent; mergeSyncAgent.DistributorPassword = "<<password>>"; mergeSyncAgent.PublisherPassword = "<<password>>"; mergeSyncAgent.Synchronize(); }etc etc..
Any help or suggestions will be greatly appeciated. Thanks.
View 8 Replies
View Related
Feb 6, 2008
Hi There,
Our company deals with financial education and typically has 9 different databases which have some cross referenced stored procedures. Every time we replicate Production database into TEST and DEV environments, we had to manually update the database references in Stored procedures. and it usually takes atleast a week and until then all the dev and test work has to wait.
Hence, I wanted to write a script, Here the code below.
-- These two variables must contain a valid database name.
DECLARE @vchSearch VarChar(15),
@vchReplacement VarChar(15)
SET @vchSearch = 'Search'
SET @vchReplacement = 'Replacement'
/*
-- Select the Kaplan Database Names in the Current Server
*/
DECLARE @tblDBNames TABLE (vchDBName VarChar(30))
INSERT INTO
@tblDBNames
SELECT
Name
FROM
MASTER.DBO.SYSDATABASES
WHERE
Has_DBAccess(Name)=1
And Name IN ( 'DB_DEV', 'DB_TEST', 'DB_PROD', 'WEBDB_DEV', 'WEBDB_TEST', 'WEBDB_PROD' , 'FINDB_DEV', 'FINDB_TEST', 'FINDB_PROD')
--SELECT * FROM @DBNames
IF @vchSearch NOT IN (SELECT vchDBName FROM @tblDBNames)
BEGIN
PRINT 'Not a Valid Search DB Name'
GOTO Terminate
END
IF @vchReplacement NOT IN (SELECT vchDBNAME FROM @tblDBNames)
BEGIN
PRINT 'Not a Valid Replacement DB Name'
GOTO Terminate
END
-- We have Valid DB Names, lets proceed...
--USE @vchReplacement
SET @vchSearch = '%' + @vchSearch + '..%'
SET @vchReplacement = '%' + @vchReplacement + '..%'
-- Get Names of Stored Procedures to be altered
DECLARE @tblSProcNames TABLE (vchSPName VarChar(100))
INSERT INTO
@tblSProcNames
SELECT
DISTINCT so.Name
FROM
SYSOBJECTS so
INNER JOIN SYSCOMMENTS sc
ON sc.Id = so.Id
WHERE
so.XType='P'
AND sc.Text LIKE @vchSearch
ORDER BY
so.name
-- Now, the table @tblSprocNames has the names of stored procedures to be updated.
-- And we have to Some HOW ?!! grab the stored proc definition and use REPLACE() to
-- update the database reference
-- Then, use cursors to loop through each stored proc and upate the reference
Now, I have got stuck how to extract the body of a stored procedure into a variable.
Please Help.... I dont want spend weeks of time in the future to do this work manually.
Madhu
View 24 Replies
View Related
Feb 9, 2012
I'm trying to insert data into a table from two tables into a single table along with a hard coded value.
insert into TABLE1
(THING,PERSONORGROUP,ACCESSRIGHTS)
VALUES
((select SYSTEM_ID from TABLE2 where
AUTHOR IN (select SYSTEM_ID from TABLE2 where USER_ID
=('USER1'))),(select SYSTEM_ID from TABLE2 where USER_ID
=('USER2')),255)
I get the following-
Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
Do I need to use a cursor?
View 5 Replies
View Related
Feb 19, 2008
Hi,
Actually we have multiple Sub Reports which we want to open from the Main Report. Initially when i used "Jump To Report" property it worked fine but in the browser the Main Report used to get refreshed everytime i had to Go Back to Main Report from Sub Report.
Second solution which i want to try is using "Jump To URL" property.
Some Details:
I have multiple parameters in the report.
My parameters are getting data from a Cube.
Parameters can have Multiple Vaue selected at a time.
I want to pass all the values to the URL.
Say
Parameter1 is DimCountryCountry
can have values such as:
[Dim Country].[Country].[All]
[Dim Country].[Country].&[India]
[Dim Country].[Country].&[Germany]
......
Parameter2 is DimCountryState
can have values such as:
[Dim Country].[State].[All]
[Dim Country].[State].&[Delhi]
[Dim Country].[State].[Punjab]
.....
Now i want to create a URL using these values,since each parameter should be separated by "&"(ampersand) my URL looks like one below.
Following URL Works fine:
javascript:void(window.open'(http://MyReportServer/ReportServer/Pages/Report.aspx?/MyReports/Project1/Country+Data&rcarameters=false&DimCountryCountry=[Dim Country].[Country].[All]&DimCountryState=[Dim Country].[State].[All]'))
as long as there is no "&" in the Parameter Value the URL works fine.
But when i try to insert values other than "[All]" it starts failing because "[Dim Country].[Country].&[India]" contains "&", which gives error due to ambiguity, (whether this "&" is a parameter separater or is it a part of parameter value)
So i found a solution for that, which is to replace "&" with "%26" escape sequence characters.This works fine as long as we specify this escape sequence in address bar. i.e if we directly paste the following URL in the address bar it will work.
http://MyReportServer/ReportServer/Pages/Report.aspx?/MyReports/Project1/Country+Data&rcarameters=false&DimCountryCountry=[Dim Country].[Country].%26[India]&DimCountryState=[Dim Country].[State].%26[Delhi]
but if we put this URL in the Javascript, it doesnot work, because the WIndow.Open function automatically replaces the
"%26" characters with "&", which we know gives ambiguity error.
Please let me know if you have any suggesiton for it. Anyway any better solution for my problem.
Thanks
Sumit
www.sumitkhemka.com
View 4 Replies
View Related
Jun 13, 2007
We were having a standards meeting today at my company and we talked about the show/hide details button in the UI. We hide reports all the time because they are sub-reports and aren't meant to be run on their own. If we can't hide the "Show Details" button and we can't ban the user with security from running the sub-report because they need to run the Main report which runs the sub-report, then what do we do?
I'd think we have the have the ability to to hide things, or least a creative way to hide them; but I don't want to deploy sub-reports to wierd places just to get around this.
The following posts reference this topic, but didn't address it; yet raise this question.
Thoughts?
Keith
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=950457&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=204599&SiteID=1
p.s. Just my own two cents, it would seem like a nice feature to be able to hide the "show details" button because there are advantages to hiding things.
View 5 Replies
View Related
Jun 4, 2012
Is there a way to find all SSRS scheduled reports details such as (Report Name, schedule time, mail IDs configured, etc.)?
We have many SCCM reports on SRS, and manual work will take very long time..
View 14 Replies
View Related
Dec 29, 2006
Hello there,I just want to ask if storing data in dbase is much better than storing it in the file system? Because for one, i am currenlty developing my thesis which uploads a blob.doc file to a web server (currently i'm using the localhost of ASP.NET) then retrieves it from the local hostAlso i want to know if im right at this, the localhost of ASP.NET is the same as the one of a natural web server on the net? Because i'm just thinking of uploading and downloading the files from a web server. Although our thesis defense didn't require us to really upload it on the net, we were advised to use a localhost on our PC's. I'll be just using my local server Is it ok to just use a web server for storing files than a database?
View 6 Replies
View Related
Mar 29, 2008
I would like to have a stored procedure to run a shared VB file, which will check a refrence value from
a SQL Server table every hour, then redirect the web page to an error page if the reference value
is equal to e.g. 'E'.
My question is: a S.P. can update a SQL Server table, but can a S.P. 'run' a shared VB file to redicret
a web page automatically? How?
TIA,
Jeffrey
View 1 Replies
View Related
Jun 16, 2004
i have a query and i would like to write the contents of the dataset out directly to a file and not bother with creating another temp table and then exporting it with a command with a dts to a csv file.
it is a type of reporting that i am trying to do
but i just need to export the raw data i retreive from the query
View 3 Replies
View Related
Nov 28, 2007
Hello!
Me and my collegues was recently assigned to maintain a SQL Server 2000 instance, which pretty much only holds one database.
From what we can tell, a backup of this database has never been created, atleast not through SQL Server.
When asking the previous owner, the answer was "We have been taking 'Legato backups' every day!"
We now intend to schedule a SQL Server backup job, but out of curiosity...
In case of a disaster, would these "Legato backups" have been any use at all?
Please elaborate :-)
View 5 Replies
View Related
Aug 24, 2007
I have a delivery extension that prints to network printers.
Now I add a subscription like a few minutes in the future via web service for each report to print.
Is there a way I can trigger the delivery directly?
Thanks for ideas, guys.
Michael
View 3 Replies
View Related
Dec 6, 2007
Hi,
Is possible to get a report directly from excel or I must develop an tools for that?
Fredo
View 4 Replies
View Related
Mar 7, 2007
First let me give you a little back ground on me. I'm very new to the ASP, ASP.NET, Visual Studio, Sql Server, Frameworks....thing. I am coming over from a PHP/MySql background of over 5 years. The change over to VBScript and VB has been to tough and I have a basic liking for the Visual Studio 2005 and the ease of putting things together. However, I have come across something that to me seems like it should be relatively simple, but haven't been able to find the documentation or samples to describe what I'm looking to do.
Rough Need:
1. Start with a form will a couple labels and a singe textbox to get the lookup date from an user.
2. Query one table/view based on the users choice of date and select only one field of returned data.(Doing this by itself is not a problem and I can display my results in a Gridview, but this is where it starts getting tricky and the gridviews won't work for me.)
3. If there is something returned, I need to start a HTML table layout or possibly some form of a Gridview(I don't see how I would use the Gridview) and start a loop, adding the first returned row from this query into the first cell.
4. Now, based on that same User Date and the returned row value from the previous query, I need to query another Table/view and return another single field, which might return 1 or multiple rows, which I need to start a loop to display unique items in cells under the first on above.
5. Based on the original User Date and each returned row from the first query, I need to query two other Table/views and get some additional information. 4-5 fields will be returned and be displayed on one row in the number of necessary columns.
6. This would finish the first row from the first query, so I would need to loop back up to see if there were any further results and continue looping until the get to the last of the results from the first query.
7. Finally, I would just need to close up the Table/gridview.
The basic results I'm looking for would be similar to the following:
Results for 10/11/2005
Field name 1
Field name 2
Field name 3
Field name 4
Field name 5
First Result from query 11 of 4 results from Query 2, but only 1 unique result
Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
Info from Query 3
Info from Query 3.
Info from Query 3
Info from Query 4
Info from Query 4
Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
Second Result from query 1First result from Query 2 after looping though the first query Second result from Query 2 after looping though the first query
Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
Info from Query 3
Info from Query 3.
Info from Query 3
Info from Query 4
Info from Query 4
Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
Info from Query 3
Info from Query 3
Info from Query 3
Info from Query 4
Info from Query 4
It seems me from what I have read and slowly figuring out, is that I should be able to directly access the DataSet returned by four SqlDataSources, one for each of the above querys and then just write my own VB to handle the necessary looping, table format and such. I can easily add the for SqlDataSources to the page and add a Gridview for each one and get 4 separate chunks of info, but can't see a way with GridViews to intermingle the info like displayed above.
So, if it can be done with Gridviews, then I would love to see how that is done. But, if someone could explain to me how I access the DataSets directly that I get from the 4 SqlDataSources, then that would be ok too. I have figured enough out with VB, that I can write the code to do my looping requirements, if I can just access the information I get back. Thanks for reading all the way through this long post.
Jack
View 1 Replies
View Related
Jan 31, 2008
Hey all Im trying to make a system in which users logged on can change their password. I dont want to use a grid view because that dosent give me the chance to let them put in their old password first for validation but now I need a way of takeing data out of the textbox with the new password and placeing it in to the field in a database.As I stand at the moment I have a data.dataview variable equal to an SQL Data Source with my query in it, bringing back a record from a users table with the users username, password and a field stating what type of user they are. It filters this by username which is stored as a session variable and username is the primary key. there is then an if statement checking that the string in the password field is equal to what the user has written in the old password box and if they match it uses the command:dv.Table.Rows(0)(1) = txtNewPassword.TextMsgBox("Password Successfully Changed", MsgBoxStyle.Information)When I run this the validation successfully checks the password is correct and then displays the message box saying the password is correct but it hasnt actually changed it. Somone I know told me that I need to use the command sqldatasource.update but I cant see where it fits in. Anyone got any ideas?
View 2 Replies
View Related
Apr 14, 2004
How to prevent connection to db directly through ODBC without using application role?
could it be done for standard user and domain user ?
Thank you
Alex
View 4 Replies
View Related
May 22, 2001
hello everyone!
I'm currently dumping tables from PostgreSQL 7 to SQL Server 2K and I've been wondering if it's possible to create a trigger between the two databases.
..like if there's an insert to a PostgreSQL table, the trigger inserts the same row to the SQL Server table.
If it is possible, please do send me a sample code.
Thanks!
View 1 Replies
View Related
Aug 31, 2012
Currently our client has a website where they are using aspx as front end and SQL server as back end. We are developing same functionality using php and my sql.Currently 1 phase of development is finished. They are using both applications to do the job. Now in 2nd integration they are asking the data sync from one database to other.
We have decided once the user enters the aspx form the data will be stored in client sql server but we though of writing a script to enter this info into a csv file so that from our side we access that file and update in mysql.
Other than ftp any other better approaches to access that file on client server?Is there any possibility to sync databases directly?
View 4 Replies
View Related
Feb 19, 2004
hi
im new to Sql server so this might be a daft question
is there something where i can put data directly into a table (i.e entering data into a grid) or do i have to write the sql every time
View 3 Replies
View Related
Apr 3, 2015
I know it is possible to use the secondary replica to pull data (application intent) etc..
But is there some way to query the replica directly via SSMS?
View 2 Replies
View Related
May 14, 2008
Hi,
I'm currently writing a desktop application that communicates directly with a SQL server database on the local network. Ideally we'd like to connect directly to the database via the Internet.
- connecting via the Internet is important because we want easy access from anywhere.
- directly is important because fast data transfer is a requirement.
Not knowing much about the security implications of such a connection, I thought I'd ask here. So what are the major risks and objections? Can the connection and data be made secure?
Cheers, Gavin
View 2 Replies
View Related
Jul 23, 2005
Greetings!I have the 3 raw data tables below, and would like to extract somedata. My current query is really cumbersome, does anyone know a betterway to get all the info (attach the right state to the lowest zip code)in one step? Thanks a lot! Here are the details.- Ideal Output, for each person , keep(1) person_id (From Table A)(2) The earliest open_date of accounts starting with 2 (From Table A)(3) ssn (From Table B)(4) Zip and state info (From Table C), but only keep the lowest zip andstate.-Table A -person_idaccountopen_date10001220000015/15/200310001220000026/20/200410001300000012/2/200210002220000038/12/200410002220000049/15/200410002300000022/16/2005-Table B -person_idzip state1000111111AA1000122222CC1000233333BB--Table C -person_idssn100011234567100022345678-Ideal Output-person_idmin_openssnzipstate100015/15/2003123456711111AA100028/12/2004234567833333BBHere is what I did:Select a.person_id, min(a.open_date), b.ssn, min(c.zip) as zip,cast (0 as varchar) as stateInto output[color=blue]>From TableA as a[/color]Join TableB as bon a.person_id=b.person_idJoin TableC as con a.person_id=c.person_idWhere a.account like '2%'Group by a.person_id, b.ssnOrder by a.person_idUpdate outputSet output.state=b.state[color=blue]>From output as a[/color]Join TableC as bon a.person_id=b.person_idand a.zip=b.zip
View 2 Replies
View Related
Jun 20, 2007
Is there a way to read a backup file to see if it contains a file withoutrestoring the backup file? We are missing a record from a table, and I needto find out when it was deleted. We have nightly backup files of thedatabase. Is it possible, knowing the database name, the table name, and theprimary key value of the record, to determine if the record exists in acertain backup file? If not, is there an alternate way to determine when aparticular record was deleted?Thank you!Neil
View 2 Replies
View Related
Oct 30, 2006
How can I use regular expressions in WHERE clause directly?
select * from mytbl where myfld like '[0-9]*key'
View 3 Replies
View Related
Dec 27, 2006
Hello,
1. Can we directly install sp2 without SP1 - for sql server 2005.
2 . Iam basically dotnet developer. iam using sql server 2005 both developer and express editions. Do i need to stop sql server service before installing sp2. ?
During sp1 installation, it seems some file are locked and when it prompt, i stopped service and continued installation.
3. Moreover Sql server 2005 express edition comes along with VS2005 didn't have management studio. I feel like having entire features installed in my system. I have downloaded express edition SQLEXPR_ADV.exe. Which is better choice for installation.
thanks
karthik
View 3 Replies
View Related
May 5, 2008
Hi all
I am using local reports.(.rdlc files)
My requirement is when the user selects some options in the form and click on Submit buttion,He should get report in PDF format directly.Is it possible?if possible give me some example code.No need to preview in general format.
Help me.
Regards.
View 3 Replies
View Related