The Stored Procedure Doesn't Exist, And Other Refresh Problems
Jan 14, 2008
I'm having some very frustrating 'syncing' problems with my report (currently in dev in visual studio) and what actually exists in the database. To start, I had my report definition open, and realized I needed a new sproc. So I went over to the db and created a new sproc, lets call it "Test1". After making a new dataset in ssrs, I can't seem to get SSRS to realize the stored proc actually exists. I continually get the error:
"The stored procedure 'Test1' doesn't exist. (System.Data)
I've shut down visual studio, re-opened, etc. Same thing. It looks like visual studio has some cached version of sys.procedures that only refreshes when the bloody thing feels like it. Any ideas?? I've been doing this for awhile, and I've minded the connection string, correct sproc syntax, etc. It runs fine on SQL Management studio.
Another, similar problem - When adding in a new column to a sproc, the dataset doesn't seem to pick up on it, no matter how many times the "refresh fields" button is hit.
View 1 Replies
ADVERTISEMENT
May 5, 2004
Hello,
I have a table which gets updated roughly every 6 seconds with data. I have setup an aspx page with a datagrid to meta tag refresh every 3 seconds.
Because the data sometimes stops for a couple of minutes or even hours, I was thinking of a way to update/refresh the aspx page only when the table data gets entered ( to stop page flickering every 3 seconds).
I was thinking about a stored procedure and using an on update procedure.
Does anyone have any preffered methods or suggestions on the best way to accomplish this task.
I use VB.Net
Thanks
Goong
View 2 Replies
View Related
Jan 16, 2008
I 've done a store procedure(SP), one for 7 report's.
The problem that i have is that the dataset doesn't refresh cols from the SP, how can i do ..i need all the columnsi n order to put them in the report.
Thks
Karla
View 3 Replies
View Related
Oct 15, 2007
here is my original Sql Code I add a parameters @CustId in line 13 when CustID not Null, I want to add this to the Where clause line 146 and 156 if CustId not null then where clause will add a reference like CustId = @CustIDif CustId is Null then not reference @custID how to Add a if ~else clause to my code? i tried all day.. but it doesn't work.. 1 SET QUOTED_IDENTIFIER OFF
2 GO
3 SET ANSI_NULLS OFF
4 GO
5
6
7
8 ALTER PROCEDURE [dbo].[usp_OutDataDownQuery]
9 @DTBEG DATETIME,
10 @DTEND DATETIME,
11 @Remark INT,
12 @BankId VARCHAR (128)
13 @CustID CHAR
14
15
16 as
17
18
19
20 SELECT
21 *
22 FROM
23 (
24 SELECT
25 ZT_Master.PriKey,
26 ZT_Master.BankId,
27 ZT_Master.TDateTime,
28 ZT_Master.PNo,
29 ZT_Master.Remark,
30 ZT_Master.CustId,
31 ZT_Master.ProcStatus,
32 ZT_Customer.[Name],
33 --ZT_Customer.AccountBAK AS Account,
34 --ZT_Customer.SCAccountBAK AS SCAccount
35 (SELECT TOP 1 SUBSTRING(PCLNO, 3, 12) FROM ZT_Detail WHERE ZT_Master.PriKey = ZT_Detail.MasterKey AND ZT_Detail.TXTYPE = 'SD') AS Account,
36 (SELECT TOP 1 SUBSTRING(PCLNO, 3, 12) FROM ZT_Detail WHERE ZT_Master.PriKey = ZT_Detail.MasterKey AND ZT_Detail.TXTYPE = 'SC') AS SCAccount
37 FROM
38 ZT_Master LEFT JOIN ZT_Customer ON ZT_Master.CustId=ZT_Customer.Id
39 ) a
40 ,-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
41 (SELECT MasterKey=ISNULL(a.MasterKey,b.MasterKey),
42 CtcbBanSDTotal=ISNULL(本行代收ç†æ•¸,0),
43 CtcbBanSDTotalAMT=ISNULL(本行代收金�,0),
44 OtherBanSDTotal=ISNULL(他行代收ç†æ•¸,0),
45 OtherBanSDTotalAMT=ISNULL(他行代收金�,0),
46 CtcbBanSCTotal=ISNULL(本行代付ç†æ•¸,0),
47 CtcbBanSCTotalAMT=ISNULL(本行代付金�,0),
48 OtherBanSCTotal=ISNULL(他行代付ç†æ•¸,0),
49 OtherBanSCTotalAMT=ISNULL(他行代付金�,0),
50 GoodSDTotal=ISNULL(代收æˆ?功ç†æ•¸,0),
51 GoodSDTotalAMT=ISNULL(代收�功金�,0),
52 GoodSCTotal=ISNULL(代付æˆ?功ç†æ•¸,0),
53 GoodSCTotalAMT=ISNULL(代付�功金�,0),
54 BadSDTotal=ISNULL(代收失敗ç†æ•¸,0),
55 BadSDTotalAMT=ISNULL(代收失敗金�,0),
56 BadSCTotal=ISNULL(代付失敗ç†æ•¸,0),
57 BadSCTotalAMT=ISNULL(代付失敗金�,0)
58 FROM (SELECT MasterKey=ISNULL(a.MasterKey,b.MasterKey),
59 本行代收ç†æ•¸,
60 本行代收金�,
61 他行代收ç†æ•¸,
62 他行代收金�,
63 本行代付ç†æ•¸,
64 本行代付金�,
65 他行代付ç†æ•¸,
66 他行代付金�,
67 代收æˆ?功ç†æ•¸,
68 代收�功金�,
69 代付æˆ?功ç†æ•¸,
70 代付�功金�
71 FROM (SELECT MasterKey=ISNULL(a.MasterKey,b.MasterKey),
72 本行代收ç†æ•¸,
73 本行代收金�,
74 他行代收ç†æ•¸,
75 他行代收金�,
76 本行代付ç†æ•¸,
77 本行代付金�,
78 他行代付ç†æ•¸,
79 他行代付金�
80 -------------------------------------------------------------------代收æˆ?功ç†æ•¸èˆ‡ä»£æ”¶æˆ?功金é¡?--------------------------------------------------------------
81 FROM (SELECT MasterKey=ISNULL(a.MasterKey,b.MasterKey),
82 本行代收ç†æ•¸,
83 本行代收金�,
84 他行代收ç†æ•¸,
85 他行代收金�
86 FROM (SELECT MasterKey,
87 COUNT(PriKey) AS 本行代收ç†æ•¸,
88 SUM(AMT) AS 本行代收金�
89 FROM ZT_Detail WHERE TXTYPE='SD' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND SUBSTRING(RBANK, 1, 3) = '822' GROUP BY MasterKey) a
90 FULL JOIN (SELECT MasterKey,
91 COUNT(PriKey) AS 他行代收ç†æ•¸,
92 SUM(AMT) AS 他行代收金�
93 FROM ZT_Detail WHERE TXTYPE='SD' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND SUBSTRING(RBANK, 1, 3) <> '822' GROUP BY MasterKey) b
94 ON a.MasterKey=b.MasterKey) a
95 -------------------------------------------------------------代付æˆ?功ç†æ•¸èˆ‡ä»£ä»˜æˆ?功金é¡?---------------------------------------------------------------
96 FULL JOIN (SELECT MasterKey=ISNULL(a.MasterKey,b.MasterKey),
97 本行代付ç†æ•¸,
98 本行代付金�,
99 他行代付ç†æ•¸,
100 他行代付金�
101 FROM (SELECT MasterKey,
102 COUNT(PriKey) AS 本行代付ç†æ•¸,
103 SUM(AMT) AS 本行代付金�
104 FROM ZT_Detail WHERE TXTYPE='SC' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND SUBSTRING(RBANK, 1, 3) = '822' GROUP BY MasterKey) a
105 FULL JOIN (SELECT MasterKey,
106 COUNT(PriKey) AS 他行代付ç†æ•¸,
107 SUM(AMT) AS 他行代付金�
108 FROM ZT_Detail WHERE TXTYPE='SC' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND SUBSTRING(RBANK, 1, 3) <> '822' GROUP BY MasterKey) b
109 ON a.MasterKey=b.MasterKey) b
110 ON a.MasterKey=b.MasterKey) a
111 -----------------------------------------------------------------æˆ?功ç†æ•¸èˆ‡æˆ?功金é¡?---------------------------------------------------------------------------
112 FULL JOIN (SELECT MasterKey=ISNULL(a.MasterKey,b.MasterKey),
113 代收æˆ?功ç†æ•¸,
114 代收�功金�,
115 代付æˆ?功ç†æ•¸,
116 代付�功金�
117 FROM (SELECT MasterKey,
118 COUNT(PriKey) AS 代收æˆ?功ç†æ•¸,
119 SUM(AMT) AS 代收�功金�
120 FROM ZT_Detail WHERE TXTYPE='SD' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND (RCODE='00' OR RCODE='') GROUP BY MasterKey) a
121 FULL JOIN (SELECT MasterKey,
122 COUNT(PriKey) AS 代付æˆ?功ç†æ•¸,
123 SUM(AMT) AS 代付�功金�
124 FROM ZT_Detail WHERE TXTYPE='SC' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND (RCODE='00' OR RCODE='') GROUP BY MasterKey) b
125 ON a.MasterKey=b.MasterKey) b
126 ON a.MasterKey=b.MasterKey) a
127 ---------------------------------------------------------------------失敗ç†æ•¸èˆ‡å¤±æ•—金é¡?---------------------------------------------------------------------------------
128 FULL JOIN (SELECT MasterKey=ISNULL(a.MasterKey,b.MasterKey),
129 代收失敗ç†æ•¸,
130 代收失敗金�,
131 代付失敗ç†æ•¸,
132 代付失敗金�
133 FROM (SELECT MasterKey,
134 COUNT(PriKey) AS 代收失敗ç†æ•¸,
135 SUM(AMT) AS 代收失敗金�
136 FROM ZT_Detail WHERE TXTYPE='SD' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND (RCODE<>'00' AND RCODE<>'') GROUP BY MasterKey) a
137 FULL JOIN (SELECT MasterKey,
138 COUNT(PriKey) AS 代付失敗ç†æ•¸,
139 SUM(AMT) AS 代付失敗金�
140 FROM ZT_Detail WHERE TXTYPE='SC' AND MasterKey IN (SELECT PriKey FROM ZT_Master WHERE TDATETIME BETWEEN @DTBEG AND @DTEND) AND (RCODE<>'00' AND RCODE<>'') GROUP BY MasterKey) b
141 ON a.MasterKey=b.MasterKey) b
142 ON a.MasterKey=b.MasterKey) b
143
144
145
146 WHERE a.PriKey=b.MasterKey AND
147 --TDateTime BETWEEN @DTBEG AND @DTEND AND
148 TDateTime BETWEEN '2007/9/5' AND '2007/9/5' AND
149
150 (a.Remark=@Remark OR @Remark=2) AND
151 (a.BankId=@BankId OR @BankId='')
152 ORDER BY TDateTime,CustId,PNo
153
154
155
156 WHERE a.PriKey=b.MasterKey AND
157 --TDateTime BETWEEN @DTBEG AND @DTEND AND
158 TDateTime BETWEEN '2007/9/5' AND '2007/9/5' AND
159
160 (a.Remark=@Remark OR @Remark=2) AND
161 (a.BankId=@BankId OR @BankId='')
162 ORDER BY TDateTime,CustId,PNo
163
164
165 GO
166 SET QUOTED_IDENTIFIER OFF
167 GO
168 SET ANSI_NULLS ON
169 GO
170
171
View 1 Replies
View Related
Dec 4, 2015
I have a PowerPivot table setup based of a SQL Server stored procedure. I am kind of surprise that when I click the Refresh button on the PivotTable Tools ribbon bar above the report the report does not refresh. Â I have to open the PowerPivot window, click refresh and then go back to the worksheet with the PivotTable and click Refresh. Â Is that by design? Â It seems like the Refresh on the worksheet just gets the existing data from the table.
View 2 Replies
View Related
Oct 6, 2015
I am trying to put together a Stored Procedure that runs other SP's based on a records found condition. Sometimes my update table either by deleting duplicates or for other reasons is empty. Running a SP to update records on a table is not needed.
IF EXISTS (SELECT TOP 1 * FROM Work_Tables.dbo.Trace_Return_Updates WHERE TR_RecType = 'CT1')
BEGIN
EXEC IMB_Trace_Data.dbo.Update_CT1_Trace_Data
END
IF EXISTS (SELECT TOP 1 * FROM Work_Tables.dbo.Trace_Return_Updates WHERE TR_RecType = 'CT2')
BEGIN
EXEC IMB_Trace_Data.dbo.Update_CT2_Trace_Data
END
IF EXISTS (SELECT TOP 1 * FROM Work_Tables.dbo.Trace_Return_Updates WHERE TR_RecType = 'FULF')
BEGIN
EXEC IMB_Trace_Data.dbo.Update_FULF_Trace_Data
END
View 1 Replies
View Related
Jun 19, 2007
How can i delete a stored procedure if it exist
like "Drop stored procedure 'sp1' if exist"
View 4 Replies
View Related
Nov 2, 2009
the Dataset in my report doesn't update the fields' values from the database. I refresh the dataset manualy in the SQL Server Business Intelligence Development Studio to see the new values in the report.
View 14 Replies
View Related
May 9, 2006
I'm rather new at reporting services, so bear with me on this one.
I have a stored procedure in MSSQL called prc_failedSLA_per_week, that has two parameters (@startWeek and @endWeek). I've added a dataset in reporting services which runs my procedure. when I run it from the data tab in RS, I get prompted for values on these two parameters, and a table gets generated. But if I try to preview my report, I get the error "Procedure of function "prc_failedSLA_per_week" expects parameter "@startWeek", which was not supplied".
I've tried to find info on this in the help file to no avail, not even google helps me in any way. I guess it's some kind of newbie mistake, but I simply can't figure out what to do.
Any help would be greatly appreciated!
View 3 Replies
View Related
Apr 3, 2015
I've encountered an issue where the ALLSELECTED function works fine unless I use a date hierarchy, i.e. year, quarter, month, date, for the rows in a pivot and then use a year slicer, select one or more years individually, and the clear the filter on the slicer. The year(s) that I selected in the slicer remain at 100% in the pivot instead of returning to the subtotals for the unfiltered slicer.
This only occurs when I use a calendar hierarchy for rows and a date field for the slicer, either from the hierarchy or a regular date field.Below are images of the normal behavior and then the result after following the steps above. Can't figure out why the calendar hierarchy is causing the issue since it works for all other time functions, etc., and follows best practices such as contiguous dates, etc.Â
View 3 Replies
View Related
May 10, 2006
T-SQL Debugger Doesn't Allow Stepping Through Stored ProceduresAnd there is no other procedure with the same name owned by dbo or anyother users.There is no error messages also, it just completes procedure andreturns resultserver:Microsoft SQL Server 2000 - 8.00.818 (Intel X86)Microsoft Corporation Enterprise Edition on Windows NT 5.0 (Build2195: Service Pack 4) and I don't know how do determine Client'sversion.What should be done (on client site or server site )to fix thisproblem.Thank you
View 12 Replies
View Related
Mar 9, 2007
Hi,
I was trying to create a simple SP that return a single value as follows:CREATE PROCEDURE IsListingSaved@MemberID INT,@ListingID INTASIF EXISTS (SELECT [Member_ID] FROM [Member_Listing_Link] WHERE [Member_ID] = @MemberID AND [Listing_ID] = @ListingID) Return 1ELSE Return 0GOWhen I try it out in the Tableadapter's preview table, I get the correct result (1, where the entries exist). However, in the BLL, I tried to get the value as:Dim intResult as IntegerintResult = CType(Adapter.IsListingSaved(intMemberID, intListingID), Integer). However, this always returns 0 (when it should be returning 1). P.S. Curiously, breakpoints skipped the VS generated code for the adapter. What could be the problem? Thanks,Wild Thing
View 3 Replies
View Related
Apr 9, 2007
I am trying to catch the @retval which is returned finally after executing sp_update_schedule stored procedure (o or 1) but i cannot catch the final resultIf i put Print statement just before the return (@retval), then i am seeing 0 as output but i want to catch that value when i execute the SP with the parameters. How can i do that?? same thing with all other system stored procedures.thanks alot in advance....if you want more info on this Q, plz let me know
View 5 Replies
View Related
Feb 20, 2008
I have a stored procedure with the following:
CREATE TABLE #t1 (... ...);
WITH temp AS (....)
INSERT INTO #t1
SELECT .... FROM temp LEFT OUTER JOIN anothertable ON ...
This stored procedure works fine in Management Studio.
I then use this stored procedure in an ASP.NET page via a SQLDataSource object. The ASP.NET code compiles without error, but the result returned is empty (my bounded GridView object has zero rows). From Web Developer, if I try to Refresh Schema on the SQLDATASource object, I get an error: "Invalid object name '#t1'. The error is at the red #1 as I tried putting something else at that location to confirm it.
What does the error message mean and what have I done wrong?
Thanks.
View 5 Replies
View Related
Feb 4, 2008
Hi All,
I Have a nifty little stored procedure that takes data from an ASP form post
and inserts the data into two tables. However what I really need this to do
before the insert is check whether there is already a record that matches
some of the criteria, and if so returns an error "This Username already
exists" and only if there isn't a record that matches the criteria is the
record inserted.
my current stored procedure looks like this -
Code Snippet@siteid int,@companyname nvarchar(50),@address nvarchar(500),@phone nvarchar(50),@fax nvarchar(50),@email nvarchar(225),@url nvarchar(225),@companytype nvarchar(50),@billingcontact nvarchar(50),@name nvarchar(50),@AccountType nvarchar(50),@PASSWORD nvarchar(50),@AccountLive nvarchar(50),@EmployeeLevel nvarchar(50)ASDeclare @NewID INTINSERT INTO dbo.JBClient(JBCLSiteID, JBCLName, JBCLAddress, JBCLPhone, JBCLFax, JBCLEmail, JBCLCompanyType, JBCLURL, JBCLAccountType, JBCLAccountlive, JBCLBillingContact)VALUES (@siteid, @companyname, @address, @phone, @fax, @email, @companytype, @url, @AccountType, @AccountLive, @billingcontact)SELECT @NewID = SCOPE_IDENTITY()INSERT INTO dbo.JBEmployee(JBEClientID, JBESiteID, JBEName, JBELevel, JBEUsername, JBEPassword, JBEAddress, JBEPhone)VALUES (@NewID, @siteid, @name, @EmployeeLevel, @email, @PASSWORD, @address, @phone)
The values that i need to check against are -
@siteid
@email
in the table dbo.JBEmployee against columns JBESiteID & JBEUsername
What i would really like to do if a record exists is return the user to an
ASP page, which contains all of the variables previously enterred -,
@siteid int,
@companyname nvarchar(50),
@address nvarchar(500),
@phone nvarchar(50),
@fax nvarchar(50),
@email nvarchar(225),
@url nvarchar(225),
@companytype nvarchar(50),
@billingcontact nvarchar(50),
@name nvarchar(50),
@AccountType nvarchar(50),
@PASSWORD nvarchar(50),
@AccountLive nvarchar(50),
@EmployeeLevel nvarchar(50)
together with a message that says "This Username already exists"
Does anyone have any idea how to do this???
Many thanks
View 6 Replies
View Related
Mar 21, 2007
We have on demand snapshot replication set up between 2 servers. When the subscriber applies the snapshot, our stored procedures start executing very slowly. Updating statistics and rebuilding indexes does not resolve the problem, however; executing sp_recompile on the affected stored procedures does fix the problem. Is this a known issue with replication? Is there a better workaround than manually recompiling stored procedures after every snapshot?
View 3 Replies
View Related
Aug 29, 2001
hi i am running this program
and its giving some problem while execution.
When the program tries to create the table expt1..its says
Msg 2714, Level 16, State 1
There is already an object named 'expt1' in the database.
and if i try to drop the table expt1 it says
Msg 3701, Level 11, State 1
Cannot drop the table 'expt1', because it doesn't exist in the system catalogs.
How should I resolve this problem...?
==========================
Declare @cmdstring varchar(255)
Declare @filename varchar(32)
DECLARE @v datetime
SELECT @v = GetDate()
Create table expt1(GMSKEY char,CONTRACT char,ORIGINALCONTRACT char,STATEMENTID char,
STATEMENTDATE char ,partner char ,ADDRESSSEQ char,BOOKINGAMOUNT char,
BOOKINGCURRENCY char,TAXEDIND char,TAXTYPE char,
DUEPERIOD char,ACCOUNTNUMBER char,PRODMONTH char,PRODYEAR char,BOOKINGUNIT char,
BOOKINGQUANTITY char,STATEMENTSEQ char,COSTID char,DELIVERYMETHOD char)
SELECT
DETAILTRANS.GMSKEY,
DETAILTRANS.CONTRACT,
DETAILTRANS.ORIGINALCONTRACT,
DETAILTRANS.STATEMENTID,
convert(varchar,DETAILTRANS.STATEMENTDATE,106) statementdate,
DETAILTRANS.partner,
DETAILTRANS.ADDRESSSEQ,
DETAILTRANS.BOOKINGAMOUNT,
DETAILTRANS.BOOKINGCURRENCY,
DETAILTRANS.TAXEDIND,
DETAILTRANS.TAXTYPE,
TITLECT.DUEPERIOD,
DETAILTRANS.ACCOUNTNUMBER,
DETAILTRANS.PRODMONTH,
DETAILTRANS.PRODYEAR,
DETAILTRANS.BOOKINGUNIT,
DETAILTRANS.BOOKINGQUANTITY,
DETAILTRANS.STATEMENTSEQ,
DETAILTRANS.COSTID,
TITLECT.DELIVERYMETHOD,
'' RECEND
INTO expt1
FROM DETAILTRANS,TITLECT
where DETAILTRANS.TITLEID=TITLECT.TITLEID
AND DETAILTRANS.CONTRACT IS NOT NULL
AND DETAILTRANS.CONTRACT!='N/A'
AND DETAILTRANS.EXPREV='E'
AND DETAILTRANS.PRELIMORFINAL='F'
AND DETAILTRANS.postedDATE IS NULL
ORDER BY DETAILTRANS.GMSKEy
select @filename = 'XAPIALTMKT'+CONVERT(varchar, @v, 112)+ SUBSTRING(CONVERT(varchar, @v, 108), 1, 2)
+ SUBSTRING(CONVERT(varchar, @v, 108), 4, 2)+ SUBSTRING(CONVERT(varchar, @v, 108), 7, 2) + '.TXT'
Select @cmdstring = 'bcp GM_PROD..expt1 out d:est' + @filename + ' -c -t"|" -r -S -Usa -Psa'
exec master..xp_cmdshell @cmdstring
drop table expt1
===========
Thanks
Harish
View 1 Replies
View Related
Dec 10, 2007
I have a simple question I hope someone can verify for me. At my company we are sending 2 different response messages. One is a commit response and one is a finalize response. Currently the service that we are sending the responses to only cares about the commit but later on in development they will care about the finalize response. The service that we are sending the finalize message to simply does not have a finalize message type and if running the profiler on it an error occurs: "This message could not be delivered because the message type name could not be found." And the message is lost. This doesn't really matter to anyone because at the time no one cares about the message. But I want to make sure that that is expected. After all service broker is supposed to be reliable. So my question is: If a message_type doesn't exist on the target side, will the message disappear and is that normal service broker behavior. I would hate to one day find the transmission queue with thousands of messages in it.
View 5 Replies
View Related
Dec 18, 2006
Hi, I not sure where my connection string is incorrect. I cant' access the SQL Server through Query Analyzer but the program can't. here is my connection string."ConnectionString" value="Data Source=xx.xx.xx.xx;Initial Catalog=xxx;UID=xxx;PWD=xxx;MAX POOL SIZE=5">
In the Query analyzer, i choose the SQL Server Authentication and provide login and password. I can access the database. Also, i can access the database at local computer. But, i can't access the database by other pc throught network.
do i need to provide any other in the connection string?
regards,
View 9 Replies
View Related
Jul 31, 2007
I have a sql command that is loaded on page load that collects information based on the query string. The query string is a random group of numbers and letters. How do I catch it and direct to an error page if the query can not be found in the database?
Thanks!
View 5 Replies
View Related
Apr 1, 2005
I have a cube that is showing measures that don't exist. Let me give an example. This example will include 3 dimensions, product, location, and time. The fact table measure will be sales.
Here are the distinct values if you were to write a sql query against the dimensionl model that feeds the cube.
Product Location Time Sales
A X 1/04 200
B Y 1/04 100
A X 2/04 300
In the cube, if you were to look at product by location for just 2/04, you would see:
Product Location Sales
All Loc 300
A X 300
Y
All Loc
B X
Y
How do you get rid of the zero's or combinations that don't exist?
Thanks,
Doug
View 1 Replies
View Related
Jun 22, 2006
Hello I am trying to run a select statement in Java against SQL Server 2K. But I keep getting an error saying that the table doesn't exist.
Is this a problem with my SQL statement?
select * from counting
I also tried
select * from dbo.counting
my connection url is
jdbc:microsoft:sqlserver://IS-0081526:1433;databaseName=bail;
I can run these queries from Query analyzer I am able to run them with the same account and login.
View 4 Replies
View Related
Aug 13, 2007
Hi all:
for example: testDataContext db=new testDataContext();var res=db.tables.single(p=>p.columnName=="hi");
if there is a record in the database, it works well, but if there isn't , it will throw an exception, then , How could I know the record exists or not ? I don't think exception is a resonable way. and in my opinion, there should be--------even must be ------a resonable way , to evaluate the query result to a bool variable, then program could judge the bool variable like :
if(bExist) show("yes, I find it");else show("sorry, the record doesn't exist in the database");
I can't imagine I got the bool variable via exception...
thanks to all..
View 1 Replies
View Related
Oct 5, 2005
hello can anybody help me in this issue:-i got two sets of connection string modules, let us say (1) working (2) not working, and here is the code for the two sets:-set (1) which is working fine:-
private void OpenData(){System.Data.DataTable dt = new System.Data.DataTable();
// The connection string was not originally hardcoded but for some reason it was staying around when passed
// in through the constructor. It was always blank.
System.Data.SqlClient.SqlConnection cn = new System.Data.SqlClient.SqlConnection(@"data source=localhost;initial catalog=truckorder;Integrated Security=SSPI;");
//System.Data.SqlClient.SqlConnection cn = new System.Data.SqlClient.SqlConnection(_cnString);
cn.Open();
new System.Data.SqlClient.SqlDataAdapter("SELECT * FROM dealers WHERE DealerWeb like '%" + _url + "%'", cn).Fill(dt);
if(dt.Rows.Count > 0)
{_dealerid = Int32.Parse(dt.Rows[0]["dealerid"].ToString());_dealername = dt.Rows[0]["dealerName"].ToString();_dealerparent = Int32.Parse(dt.Rows[0]["dealerParent"].ToString());_usedMessage = dt.Rows[0]["usedMessage"].ToString();_rentalMessage = dt.Rows[0]["rentalMessage"].ToString();}
cn.Close();}----------------------------------------------------------------------------------------------------------------------------------------------------------------------set (2) not working fine:-private void OpenData()
{
System.Data.DataTable dt = new System.Data.DataTable();System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection ();conn.ConnectionString = "integrated security=SSPI;data source=FR011PC;persist security info=False;initial catalog=TruckOrder";
try{conn.Open();new System.Data.SqlClient.SqlDataAdapter("SELECT * FROM dealers WHERE DealerWeb like 'yalevictoria.com.au'", conn).Fill(dt);
if(dt.Rows.Count > 0){_dealerid = Int32.Parse(dt.Rows[0]["dealerid"].ToString());_dealername = dt.Rows[0]["dealerName"].ToString();_dealerparent = Int32.Parse(dt.Rows[0]["dealerParent"].ToString());_usedMessage = dt.Rows[0]["usedMessage"].ToString();_rentalMessage = dt.Rows[0]["rentalMessage"].ToString(); _dealerWeb = dt.Rows[0]["dealerWeb"].ToString();}}
finally
{conn.Close();}THE DIFFERENCE IN BOTH THE SETS IS :- The Connection String (if you look at carefully) the one which is working has localhost and the one which is not working is having FR011PC (this code is working fine on FR011PC machine name and SqlServer Name) BUTwhen i transfer FR011PC code to the localhost machine, I mean i changed to datasource from FR011PC to localhost and run its giving me SQL SERVER DOESN'T EXIST OR ACCESS DENIED.Can any body help me on this issue has this is urgent for me please...................
View 2 Replies
View Related
Jul 10, 2014
I have TABLE1 and TABLE2
TABLE1 (ref,RESOURCE01,RESOURCE02,RESOURCE03,RESOURCE04,R ESOURCE05)
TABLE2 (ref,RESOURCE01,RESOURCE02,RESOURCE03,RESOURCE04,R ESOURCE05)
If TABLE2 has a data in resource 01-05 that isn't in resource01-05 of TABLE1 then I want to added it to the next free slot where ref is the unique key.
Note TABLE2 doesnt have to have all of TABLE1
eg if
TABLE1
01 AAA BBB
02 CCC DDD EEE
03 AAA DDD
TABLE2
01 AAA CCC
02 CCC DDD EEE FFF
03
I would like TABLE1 to be updated to appear like
TABLE1
01 AAA BBB CCC
02 CCC DDD EEE FFF
03 AAA DDD
Where do I even start here?
View 4 Replies
View Related
Nov 11, 2006
Hello,few users have problems with our application(ADP/MsAcces2000+SqlServer2000). Whenthey want to open a report which source is a stored procedure, they getmessage that "record source specified..... do not exist" - of course,it's not true.More details:- other users don't have this problem- they have WinXP- all users have the same permissions to SQL objects- I've checked Microsoft KB(http://support.microsoft.com/kb/243532/en-us) and they write about"dbo." before source name - I use that, so it's not a solution. Whatmore, in application there are lists which have SP as row source andwithout "dbo." and it works. (In lists a row source is defined as:"exec <sp_name>", in reports as: "dbo.<sp_name>").- computers have all service packs, new version of MDAC, etc.- I asked another user, who doesn't have this problem on his machine,to login on "bad" machine and he couldn't open reports too.Maybe someone could help? because I don't have more ideas.
View 1 Replies
View Related
Jul 18, 2007
In my package, the first two tasks are as follows:
1)
IF EXISTS (SELECT name FROM sysobjects WHERE name = '<tablename>' AND type = 'U')
BEGIN
drop table dbo.<tablename>
END
2)
IF NOT EXISTS (SELECT name FROM sysobjects WHERE name = '<tablename>' AND type = 'U')
BEGIN
CREATE TABLE [dbo].[<tablename>](
col1,col2,col3......
)
end
so why am I getting the following error when trying to run the package?
Error Message
===================================
Package Validation Error (Package Validation Error)
===================================
Error at Get Fenics data to table [Load into FFFenics table [155]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E37 Description: "Invalid object name 'dbo.FFFenics'.".
Error at Get Fenics data to table [Load into FFFenics table [155]]: Failed to open a fastload rowset for "[dbo].[FFFenics]". Check that the object exists in the database.
Error at Get Fenics data to table [DTS.Pipeline]: "component "Load into FFFenics table" (155)" failed validation and returned validation status "VS_ISBROKEN".
Error at Get Fenics data to table [DTS.Pipeline]: One or more component failed validation.
Error at Get Fenics data to table: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, DataWarehouseProjectManager manager, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DtsPackagesFolderProjectFeature.ExecuteTaskOrPackage(ProjectItem prjItem, String taskPath)
View 4 Replies
View Related
Jul 23, 2007
I'd like to get some ideas for the following:
I am writing a quick mini-application that searches for records in a database, which is easy enough. However, if the search term comes up empty, I need to return 10 records before the positon the search term would be in if it existed, and 10 records after. (Obviously the results are ordered on the search term column)
So for example, if I am searching on "Microsoft", and it doesn't exist in my table, I need to return the 10 records that come before Microsoft alphabetically, and then the 10 that come after it.
I have a SP that does this, but it is pretty messy and I'd like to see if anyone else had some ideas that might be better.
Thanks!
View 2 Replies
View Related
Sep 20, 2007
I've got a big problem that I'm trying to figure out:I have an address table out-of-which I am trying to select mailing addresses for companies UNLESS a mailing address doesn't exist; then I want to select the physical addresses for that company. If I get multiple mailing or physical addresses returned I only want the most recently edited out of those.I don't need this for an individual ID select, I need it applied to every record from the table.My address table has some columns that look like:
[AddressID] [int][LocationID] [int][Type] [nvarchar](10)[Address] [varchar](50)[City] [varchar](50)[State] [char](2)[Zip] [varchar](5)[AddDate] [datetime][EditDate] [datetime]AddressID is a primary-key non-null column to the address table and the LocationID is a foreign key value from a seperate Companies table.So there will be multiple addresses to one LocationID, but each address will have it's own AddressID.How can I do this efficiently with perfomance in mind???Thank you in advance for any and all replies...
View 5 Replies
View Related
Sep 20, 2007
I've got a big problem that I'm trying to figure out:
I have an address table out-of-which I am trying to select mailing addresses for companies UNLESS a mailing address doesn't exist; then I want to select the physical addresses for that company. If I get multiple mailing or physical addresses returned I only want the most recently edited out of those.
I don't need this for an individual ID select, I need it applied to every record from the table.
My address table has some columns that look like:
[AddressID] [int]
[LocationID] [int]
[Type] [nvarchar](10)
[Address] [varchar](50)
[City] [varchar](50)
[State] [char](2)
[Zip] [varchar](5)
[AddDate] [datetime]
[EditDate] [datetime]
AddressID is a primary-key non-null column to the address table and the LocationID is a foreign key value from a seperate Companies table.
So there will be multiple addresses to one LocationID, but each address will have it's own AddressID.
How can I do this efficiently with perfomance in mind???
Thank you in advance for any and all replies...
View 2 Replies
View Related
Jul 23, 2005
I'm trying to create a local copy of a popular CRM database calledSalesforce.com. Many of the tables in the DB have FOREIGN KEYreferences that I want to preserve, but I've run into a chicken and eggproblem. Table "A" has a reference to table "B," and table "B" has areference to table "A." So I can't CREATE one until the other exists.Is there a way to disable these checks until I've created all theschema?Here's what I see (error first, then SQL that caused it):Server: Msg 1767, Level 16, State 1, Line 1Foreign key 'FK__UserRole__LastMo__48CFD27E' references invalid table'User'.Server: Msg 1750, Level 16, State 1, Line 1Could not create constraint. See previous errors.CREATE TABLE salesforce3.dbo."UserRole" ("Id" varchar(18) PRIMARY KEY ,"Name" varchar(40), "ParentRoleId" varchar(18) REFERENCES"UserRole"(Id), "RollupDescription" varchar(80),"OpportunityAccessForAccountOwner" varchar(40),"CaseAccessForAccountOwner" varchar(40), "LastModifiedDate" datetime,"LastModifiedById" varchar(18) REFERENCES "User"(Id), "SystemModstamp"datetime);CREATE TABLE salesforce3.dbo."User" ("Id" varchar(18) PRIMARY KEY ,"Username" varchar(80), "LastName" varchar(80), "FirstName"varchar(40), "CompanyName" varchar(80), "Division" varchar(80),"Department" varchar(80), "Title" varchar(80), "Street" text, "City"varchar(40), "State" varchar(20), "PostalCode" varchar(20), "Country"varchar(40), "Email" varchar(80), "Phone" varchar(40), "Fax"varchar(40), "MobilePhone" varchar(40), "Alias" varchar(8), "IsActive"bit, "TimeZoneSidKey" varchar(40), "UserRoleId" varchar(18) REFERENCES"UserRole"(Id), "LocaleSidKey" varchar(40), "ReceivesInfoEmails" bit,"ReceivesAdminInfoEmails" bit, "EmailEncodingKey" varchar(40),"ProfileId" varchar(18) REFERENCES "Profile"(Id), "LanguageLocaleKey"varchar(40), "EmployeeNumber" varchar(20), "WirelessEmail" varchar(80),"LastLoginDate" datetime, "CreatedDate" datetime, "CreatedById"varchar(18) REFERENCES "User"(Id), "LastModifiedDate" datetime,"LastModifiedById" varchar(18) REFERENCES "User"(Id), "SystemModstamp"datetime, "UserPermissionsMarketingUser" bit,"UserPermissionsOfflineUser" bit, "UserPermissionsWirelessUser" bit,"UserPermissionsSuperCssUser" bit, "UserPermissionsAvantgoUser" bit);
View 2 Replies
View Related
Sep 16, 2015
We have a maintenance plan running everyday for rebuild and re-organisation of indexes. But, somehow its getting failed. Here is the script that we are running for rebuild or re-org.
/*
Script to handle index maintenance
Tuning constants are set in-line current values are;
SET @MinFragmentation
SET @MaxFragmentation
SET @TrivialPageCount
[code]....
View 19 Replies
View Related
Jun 25, 2001
I am work on SQL Server 6.5
When I want to drop a view then appear error message :
"Msg 3701, Level 11, State 1 Cannot drop the view 'EUL_ODBC_SCHEMAS',
because it doesn't exist in the system catalogs."
Has anybody else experienced this, and do you know what is causing the warning?
Thanks in advance for any replies.
View 2 Replies
View Related