Jump to content
Xtreme .Net Talk

Puiu

Avatar/Signature
  • Posts

    90
  • Joined

  • Last visited

Everything posted by Puiu

  1. Hello I am having a strange problem displaying a report in local mode. It's a rdlc report that works fine on the development machine, but when i move the application and try to display the same report it says "Some parameters or credentials have not been supplied" there are 2 parameters that show just fine on the development machine. the database has exactly the same data in it, only the server is different. practically only the connection string changes on the other computer, and the login used to access the database has full privileges. thanks
  2. Hello I have an application that sometimes requires database updates. however some stored procs updates must not be run on all the servers. I've tried something like: if @@servername = 'MyServer' begin alter proc MyProc ..... end But this doesn't work. I also tried using dynamic sql but also didn't work. Thanks
  3. No, I am using the report tool from microsoft.
  4. In my application I use report viewer (not reporting services) to display invoices. Can anyone help with how i could print like 20 invoices at once? The user would give a command that would ask the software to print from invoice 100 to 120. I am guessing that i should use the print document control but how do i pass the data from the report viewer to the print document? Thanks
  5. I don't know for the first question, but for the second this might help: For i As Integer = 0 To datagridview.Columns.Count - 1 datagridview.Columns(i).SortMode = DataGridViewColumnSortMode.NotSortable Next
  6. I have an xml that looks like this: <Root> <row> <F1>04858</F1> </row> </Root> The only way I know to select from this and make it look like a select from table is this: declare @xml xml set @xml = '<Root> <row> <F1>04858</F1> </row> </Root>' DECLARE @docHandle int EXEC sp_xml_preparedocument @docHandle OUTPUT, @xml select * from OPENXML(@docHandle, N'/Root/row') WITH (F1 varchar(10)'F1') My question: Is there a simpler way to do that? Thanks
  7. It seems that the picture was saved as a 8 bit picture and that's why the error appeared. I've modified the picture and saved it as a 24 bit picture and now it works!
  8. Hi On a aspx web page i'm rendering a RDLC report directly in pdf file. The report has a background image. On the local machine everything works fine, the PDF shows correctly (with the background image as well). The image is embedded in the rdlc file. When I upload it on a server and try to render it it says "Insufficient data for an image". The report is displayed but without the background image.... Any ideeas why?
  9. Hi, I have a rdlc report and a table. In my project i have some 3 datasets built by me (a class with public properties). Anyway, when i dragged an item in my table i accidentally dragged one from the wrong dataset and now in the table's datasets list there is always this dataset that i don't need. Does anyone know how to remove it from there (except for recreating the table), because every time i load the report i have to load that dataset also. Thanks
  10. Hi, I've created a windows forms application (VS 2005) and i would like to place it on server so that other computers on my network run it from there. I already copied the software on the server, but when i try to run it from another computer it simply says that the application has stopped working. Thanks
  11. the situation is a little strange: I have a sql server 2005 database on a remote server. The problem is that on that server there is also running a sql server 2000 instance. even if I specify the instance name in the connection dialogbox it never connects to the sql server 2005 instance (i get the error that says it could not find the server\instance). But it always connects to the sql server 2000. However if i connect from a different ISP the connection works. We couldn't find the problem exactly (if it's at my end or at theirs....). At first glance I'd say it's on my side but i don't know exactly where.... that's why i thought that if i could find a way to reach the server through another ISP (proxy) would work...
  12. Hello, Is there a way to configure the SSMSE (SQL Server Management Studio for Express Edition) to connect to a database server using a proxy? I have the SSMSEE installed on my computer and I want to connect to a remote database but I want to use a proxy to do that. thanx
  13. Hello! I'm having a problem with datetime and smalldatetime parameters. I need to insert a date in a smalldatetime field. The problem is that the date comes from the application in different formats depending on how the computer was set. In this particular case I need to insert a date with hour and minute (13/04/2007 17:45) but on some computers the string returned is something like 13/04/2007 05:45 PM (so i get the error that says it could not convert the string to datetime). I need to insert the minutes like 17:45 so that when the user looks back to know that the action took place in the afternoon and not in the morning. I think the general question would be: how to receive a valid parameter datetime or smalldatetime no matter the settings on the users computer? If you have sugestions for resolving this using either .net code or sql (transact-sql) i'm all years (and eyes :) ) Thank you
  14. Let's say I have a stored procedure SP_Master with a code similar to this: create proc sp_master as begin begin tran exec sp1 exec sp2 update table1 set... rollback end My question: the rollback statement will also rollback the changes made by sp1 and sp2? Thanks
  15. Hello, Does anyone know if Visual Basic .NET 2005 offers support for OCR (optical character recognition) ? Has anyone done anything like this using vb net's classes and not third party software? If i remember correctly Office Imaging had OCR and I thought that maybe there would be some support in vb .net for it. Thanks
  16. Can anyone help me with this question: What is the difference between having multiple instances of SQL Server, each running a different database, and having one instance of SQL Server running multiple databases? What is the advantage of having multiple instances of SQL Server on the same machine? Thank you
  17. Thank you for your answer Nerseus. I also found this page that has a lot of interesting things on it: http://www.sql-server-performance.com/ At the bottom of the page there are some interesting links. This link: http://blogs.msdn.com/sqlqueryprocessing/default.aspx is actually the new address of the link you gave me. I'll dig into these and i'll write here if I will find anything interesting. Thank you
  18. Hello, I have a database with multiple tables that reference each other using foreign key constraints. On each of these columns i set a different nonclustered index. However it seems that not everywhere i have a join on those foreign keys the index is used. My question: Is there a chance that a query uses a nonclustered index and the execution plan doesn't show it? I've red somewhere that the nonclustered indexes use the clusterd index to retrieve their data and i was asking myself if this wouldn't hide the use of the nonclustered index in the execution plan. thank you!
  19. You can use Select * into New_Table from Old_Table Like this you will create automatically a new table with the same structure and the same data. However i don't think that it will keep the indexes, so check it out
  20. Hello everyone, I am creating a small application that will use SQL Server 2005 Express as database. This little piece of software will be used in different locations and at the end of the day it will have to synchronize the data from all the places where SQL Server will be installed. The next day all the locations' databases will contain the same information. Working in real time on the same database is not an option due to the possibly large distances between the locations. I haven't done this before, so i am asking you how to do this...what would be the best approach? Thank you!
  21. Usually I use the Execution Plan. But it depends...what do you want to test it for? to see what kind of results it returns or to see what indexes it uses..
  22. use just ... group by DateCreated order by DateCreated
  23. I'm trying to create a dll to use inside SQL Server 2005 and i have a strange problem: Imports System Imports System.Data Imports System.Data.Sql Imports System.Data.SqlClient Imports Microsoft.SqlServer.Server Imports System.Data.SqlTypes Public Class SQLCLR <Microsoft.SqlServer.Server.SqlProcedure()> _ Public Shared Sub MySub(ByVal SomeString As String, ByVal DI As Date) Dim cmd As New SqlCommand Dim PrimaPrima As String Dim j As Integer Using connection As New SqlConnection("context connection=true") connection.Open() cmd.Connection = connection While SomeString.Length > 0 j = SomeString.IndexOf(",") PrimaPrima = SomeString.Substring(0, j) 'de pus update command cmd.CommandText = "UPDATE Prime SET" & _ "DI =" & DI.ToString & " where idPrima =" & _ PrimaPrima cmd.CommandType = CommandType.Text cmd.ExecuteNonQuery() SomeString = SomeString.Substring(j + 1, SomeString.Length - j - 1) End While End Using End Sub End Class The problem appears at this line: <Microsoft.SqlServer.Server.SqlProcedure()> _ It says that Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement. Any ideeas why? I have nono thanks
  24. The solution that comes to me would be this: create a stored proc where you have something like this: declare @x as int, @y as int, @Sum as int select @x= SUM(x) FROM tblSTAGING WHERE FDATE > '13-Feb-2006' AND FDATE < '14-Jun-2006' select @y = SUM(y) FROM tblSTAGING WHERE FDATE > '13-Feb-2006' AND FDATE < '14-Jun-2006' select @Sum = @x + @y UPDATE tblDaily SET SALES = @x, REDEMPTIONS = @y, NET = @Sum this also might work: update d set d.Sales = sum(t.x), d.Redemptions = sum(t.y) d.Net = ( sum(t.x) + sum(t.y) ) from tblStaging t, tblDaily d where t.idSomething = d.idSomething and t.FDATE > '13-Feb-2006' AND t.FDATE < '14-Jun-2006' however i don't think i tried this before...i'm not sure it's gonna work try it and see if you get what you wanted
  25. Maybe this site might be of help also: http://www.connectionstrings.com/
×
×
  • Create New...