Use NoRows In VB .Net 2005 Console Application
I have a VB .Net console application that invokes a report via a web service call. It then renders the report into Excel and emails it to the appropriate party.
I would like to suppress the email event if the dataset is empty. So the question is, can one access the NoRows property or equivalent in this environment?
I am able to get some information from the following code:
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
The result and execInfo do not seem to deliver back the row count. Is this information available at all? If not, I may have to do an ADO call to the query to get it. Running the query twice is a pretty inefficient solution.
View Complete Forum Thread with Replies
Related Forum Messages:
SQL Express And Console Application
I have created a Web application that uses a SQL Express file Database (mdf). I have also created a console application that looks to the (mdf) in the Web Directory to process some server-side tasks, (Email, process data, etc). Everything works well on my Development Machine, however when I Publish my Web App and Console application to a server, the Web App works fine, the Console App is buggy. The main error I get is ;that the user logged into the server cannot access the Database. (User domcholman cannot access). However this is not always the case, sometimes it works. Question is, how does SQL Express authenticate credentials when in Windows Auth mode? Shouldn't it allow the Service account to access the database? Are there any best practices? Should I use an account and password instead? thanks...
View Replies !
Automate Application - Active Directory, Console App,?
Hi, I need to create a solution to automaticly retrieve informmation from a databases and update the respective information for each user in AD. I already developed a web version, but management would like to automate this on a nightly basis. I don't beleive this would be possible as a web solution? I am still kind of new to .NET development and not sure how to accomplish this. I believe my options are: 1. create a dll and schedule a VB script to call the dll, or 2. create a VB.NET console application to run on a schedule. Any recomendations? Thanks!
View Replies !
SQL Server 2005 Management Console
We installed SQL Server 2005 x64 on a server for our client here at our office. We can't connect to it using Enterprise Manager. I'm assuming we need to install the management console because of the differences in 2000 and 2005. The install is for a x64 and our workstations are x32. Do I need to get a media kit for a x32 because the x64 install won't work. Where can I get the install for the x32 Management console and will this work?
View Replies !
NoRows SubReport
Greetings, I have a report which contains three subreports. Each subreport is contained within a rectangle in the main report so I can force a page break after each subreport. In each of the subreports, there is a graphic and a text box on one line, then another text box below those two items, then a table below all that. My problem is that if one of the subreports returns no data, it is resulting in a NoRows sort of situation and not even the graphic and the two text boxes are shown. I understand that you can set a NoRows message, but ideally, I want my NoRows message to be the graphic and the two text boxes, not a plain text message. I'm not sure if this is even possible or at the very least if I could conditionally force a page break in my rectangles based on whether one of the subreports returns a NoRows situation. Thanks In Advance
View Replies !
SQL Server Express 2005 Managment Console Not Logging In
Hi all, We have a machine with SQL Server 2005 Express installed and we use to have no problems connecting to this using the management studio using Windows Authentication. Since yesterday when we open the management studio and press connect using Windows authentication, the logon dialog remains active but does not disappear. In the backgroung I can see the name of the instance on the machine and after a few seconds it goes to green, to show its connected but I can't do anything without cancelling the logon. If I cancel the logon, it sets it is not connected to any server, if i try to launch the instance from the registered servers, with the green connected symbol it hangs. I have left the logon dialog overnight (14 hours) and it still did not disappear. I am looking at any patches that may have been installed but none since the end of May...does anyone else have a similar problem?
View Replies !
Subreport NoRows &&"internal Error&&"
I have one report which has a list with subreports in it. If there is no data, I always got error " An internal error occurred on the report server. See the error log for more details". I tried the "NoRows" property, it didn't help either. I noticed similar posts within this forum before, but haven't found the solution yet. Could somebody shed some light on this? Thanks! Guohui
View Replies !
SQLCe Errors When Doing Developing A SQL Mobile Application With Visual Studio 2005 And SQL Server 2005 Tutorial
I'm attempting to use RDA to synchronize a pocket pc emulator with SQL Server 2005 database by following tutorial http://msdn2.microsoft.com/en-us/library/aa454892.aspx, which uses AdvWorksMobile database that comes with SQL Server 2005. When get to testing of "To test application features " ( step 4 of the merge replication setup lab ), I am receiving SQLCe Exception errors. ORIGINALLY, I was able to deploy an application and view the local database on the emulator, but once I clicked "InitSinc" button, I received an error. "Failure to connect to SQL Server with provided connection information. SQL Server does not" exist, access is denied because the SQL user is not a valid user on the SQL Server, or the password is incorrect. Found this error listed in Server Agent Errors log http://technet.microsoft.com/en-us/library/ms172357.aspx, but it wasn't very helpful since it doesn't provide any suggestions on fixing the problems. I am brand new to SQL CE Server , mobile programming and .NET framework in general so please bare with me All the connections / security settings, etc that were set up were taken from a tutorial so I am not sure what SQLCeServer is complaining about. Reading up on the error on the web didn't help, it all pointed to making sure that the snapshot folder had correct permissions set up. I verified that MACHINENAMEUISR_MACHINENAME guest user had Read rights to the database so I don't think that piece is the problem. Otherwise ,Merge publication has been setup in Microsoft SQL Server Management Studio by following the tutorial. I am trying to run this sync on my home pc so there should be no issues with any user permissions I have IIS installed I did NOT have SQL Server Agent running in management studio at this time I am trying to run this tutorial on an XP machine, which is my regular home PC so I dont think there are any special networking settings to consider I am able to hit http://localhost/AdvWorksMobile/sqlcesa30.dll from my pc OK, but when I try to hit it from a cradled emulator ( after replacing "localhost" with "MACHINE_NAME" ), Internet Explorer on the emulator gives me a "Cannot Connect With Current Settings" error message. This part wasn't part of tutorial but decided so not sure if I am supposed to be able to hit it from my emulator..so I am not sure if the fact that I can't hit it is related to the problem. AFTER STARTING SQL SERVER AGENTin Microsoft SQL Server Management Studio, I killed the application, and after relaunching it, it hits "The Specified table does not exist [Vendor]" error. This time it doesn't even launch first - that is I dont even get to pressing "InitSinc" button. Debugger is showing that this error is hit on the following line in AdvWorksMobile.AddWorksDataSetTableAdapters int returnValue = this.Adapter.Fill(dataTable); I am not sure why the errors changed on me after starting SQL Server Agent. What can I do to fix this connection problem? Thank you so much for your help! Irina
View Replies !
C# Console Access Sql
hi, all, i am using VS 2005. the c# program and sql data(Database1.mdf) including Table1 are within the same project.how can i use the C# program to access the data within Database1.mdf?such as what is the ConncetionString of that?any simple sample codes? btw. i have tried: String connStr =@"server = (local)etsdk;database = Database1;integrated security = sspi;";
View Replies !
New SSB-Management Console
Hi, we are currently planning the development of a new SSB-Admin-Tool for SOA environments, which will allow dynamic configuration during MSBuild, register and monitor all services, dynamically configure routes (supporting gateway-servers and services registered on multiple servers for fail-safe). I would like to know if MS is currently working on something similar (the Service-Listing-Manager is buggy, old and seems to be dead on GDN) and what the community thinks.
View Replies !
Isqlw.exe From A Console App
Can someone who knows a lot more about this than me please tell why, when the following code executes, I get a pop-up window telling me the usage of isqlw.exe? <code> strQueryCommandPath = "C:\Program Files\Microsoft SQL Server\80\Tools\Binn\"; strArguments = "-S(local)\SQLEXPRESS "; strArguments += "-Usa "; strArguments += "-Padminmlc "; strArguments += "-i" + strCurrentDir + strFileName + " "; myProcess.StartInfo.WorkingDirectory = strQueryCommandPath; myProcess.StartInfo.FileName = "ISQLW.EXE"; myProcess.StartInfo.Arguments = strArguments; myProcess.StartInfo.UseShellExecute = false; return myProcess.Start(); </code> I've also tried it with a space in between the - switch and also with quotes around the switch arguments. I've put the entire path in just the StartInfo.FileName instead of switching the working directory as well. I can't for the life of me get it to actually fire off this command for some reason. p.s. I've also tried using "/"s instead of "-"s as well.
View Replies !
Different Login && SQL Console Root .....
Logged on local Administrator on one of my sqlserver 2000 "ABC" and registered 5 sql groups and linked 50 sql2k servers from MSDE to Standare (all sp3). Now, I need a different login on this machine "ABC", how could I get back all the SQL Enterprise Manager Console Root Setting and connections like before? thanks David
View Replies !
I Need A Singe Example Using Console Utility
Hello, I need to use the console and I never did that. I tried with the Book on line to make a little file .BAT using console /sservername /ppipe_name Could cou give me a single example and try to explain how to complete line by line (in Sybase <expression> type info to console is enough !) a log file the users will read after in the Internet application. Thanks Axel
View Replies !
MSDTC Admin Console
Hi All, When I type "DAC" at the command Prompt ... it doesn't launch the Admin Console for MSDTC .. Do we have to install something to get this Admin console working... Thanks, Venu
View Replies !
MSDTC Admin Console
Hi All, When I type "DAC" at the command Prompt ... it doesn't launch the Admin Console for MSDTC .. Do we have to install something to get this Admin console working... Thanks, Venu
View Replies !
Server Management Console Only??
Can the Server Management Studio Express be installed on a machine without SQL Server Express? I have a machine that I use daily that I need to access a remote instance but there is not a need (or space) to fully install SQL Server onto the local machine - all I need is the management tool. I tried installing it but the process errors out, saying a pre-requisite (MSXML6) isn't found. It refers me to a site with all the different SQL Server downloads. All I need is the management tool on this machine. Is there a way to do it? Tried loading "MOM" but it doesn't show up either Thanks Paul P
View Replies !
Accessing AS 2005 From ASP.NET Application
I have an asp.net application. This application provide consolidated information to the user using Analysis Services 2005. Within it, one aspx page uses MDX query to retrieve the information from the cube. However, we are unable to access AS 2005 because of authentication issues. What would be the easier to implement and deploy scenario? How can I access AS 2005 from an ASP.NET application? Is there any feature to use?
View Replies !
Application Roles In SQL 2005
We have an an application that was written using OLE DB (ADO) against a SQL 2000 Server that uses an Application role to give rights to the database objects. It connects, calls sp_setapprole and goes on. If the database needs to LOCK a record, it is creating a new ADO Connection and instantiating the Approle again. This model has been working fine up til now. Now we are installing a SQL 2005 server for the latest version of the product we are working on and are running into an error. The error is Error: 18059, Severity: 20, State: 1. The connection has been dropped because the principal that opened it subsequently assumed a new security context, and then tried to reset the connection under its impersonated security context. This scenario is not supported. See "Impersonation Overview" in Books Online. It's happening when the second ADO Connection for locking a record is being created and the sp_setapprole is being executed. One of my questions is what is the problem with executing the approle on a different connection? Our code has not changed, so obviously SQL 2005 is doing something different. The other is What can we do to correct this? Is the resource pooling different? We had problems in the beginning with approles and figured out through research that we needed to add OLE DB Services=-2 to the connection string to turn off resource pooling. Is there an extra step to using Approles in SQL 2005? Any help would be greatly appreciated as we need to resolve this ASAP. Thanks, David
View Replies !
MS SQL Server Express - Is Console Window Available?
Hello everybody, MySQL has a WebServer console, that lets to create tables via easy to handle SQL queries. Since I am used to SQL Server console, I would like to have such window in Micosoft SQL Server Express coming with Visual Studio 2008. Despite I searched for it, I did not find a database console window. Does MS SQL Server Express offer a Server Console that lets the database to be accessed via SQL queries, please?
View Replies !
Console Apps Work For SA But No Other User
Hi My console applications work for SA and no other user. I can run the Stored procedures used in the console application from Query analyser when logged in with username/password that I am attempting to use for console applications. I am using SQL server authenication. User access permissions look ok in Enterprise Manager. Access is permit for my user. Any suggestions? Thanks
View Replies !
SQL Express And Management Console Ctp Issue
So i installed sql express and the management console and have the sql service and browser running. I try to connect to my instance of sql express with the management console and it says it doenst allow remote connections. error: http://img95.imageshack.us/my.php?image=error28to.jpg What do i need to do to be able to use the management console? I was able to connect before but due to some bad advice think i stuffed up the whole thing and had to uninstall sql express and the management console. I re-installed them both but am now getting this error. what the heck is the deal with this? It shouldnt be this hard! This is in relation to an earlier issue i had trying to get to connect to a database from within visual web developer express and now i can connect to my sql express instance but cant get into the managment studio. :(
View Replies !
Console.WriteLine Generates HostProtectionException
Gotcha! It took a few minutes of staring at my CLR method (it's actually a ServiceBroker service), trying to figure out why I was getting an exception on something that looked pretty innocuous. It turned out to be the Console.WriteLine(...) statement. In hindsight, not really much of a surprise . However, for debugging purposes, I'd still like to use Console.WriteLine. Is there a HostProtectionAttribute I can apply that will allow it? Josh
View Replies !
Writing Variable Values In Console
is there a possibility to print the value of a variable in the debug console? it seems that Console.WriteLine in a script task doesn't work. or is there a better way in order to debug the value of a variable at a certain point?
View Replies !
Connection Issue With Management Console
When i try to connect to Integration Services on a SQL 2005 Machine, it Gives me a Class not registeed. But i can connect to SQL 2008 Integration Services without a issue. I tried Restarting the 2008 machine and Also Reinstalling the SSIS Piece and also Reinstalled SQL 2008, but nothing seems to Help.
View Replies !
How To Call SQL Server 2005 From ASP.NET Application?
I am trying to call a view that is already in SQL Server 2005 from my ASP.NET 2.0 application. I get the following error message: The request for procedure 'vwMyView failed because 'vwMyView' is a view object. I thought I could call a view the same way that I call a stored procedure but I guess I was wrong. How can I fix this? Here is some sample code too: Dim Results As DataSetDim Cmd As IDbCommand Dim Adapter As IDbDataAdapter Results = New DataSet Cmd = DB.CreateCommandCmd.CommandText = "vwMyView" Cmd.CommandType = CommandType.StoredProcedure Adapter = DataSource.CreateDataAdapter Adapter.SelectCommand = Cmd DB.Open() Cmd.Connection = DB Adapter.Fill(Results) Cmd.Dispose() DB.Close() Return Results
View Replies !
Application Cannot Connect To SQL Server 2005.
I am having a strange problem. I have an application that to connects to SQL Database in SQL Server 2005. When I run the application with Visual Studio everything works fine but when I deploy the application on my web server and then to access the site . I get an error : Login failed for user ''. The user is not associated with a trusted SQL Server connection. For some reason the application is not passing the user name . I have checked the IIS and authentication is set to Integrated Windows Authentication . My connection string is correct as well <add name="xxxxx" connectionString="Data Source=xxxxxx;Initial Catalog=xxxx;Integrated Security=SSPI" providerName="System.Data.SqlClient"/> I will appreciate any kind of assistance in this matter. Thanks
View Replies !
Importing CVS To SQLServer 2005 In A Web Application
Importing CVS to SQLServer 2005 in a web application: I need to import CSV file to a table. This is a .Net 2.0 web application running in the WebServer which has .Net 2.0 installed. SQL Server 2005 is a database in another machine. What are my options? Would SSIS work in WebServer if no database installed in that machine. Thanks
View Replies !
Can't Connect To Sql Server 2005 From My Asp.net Application
Hi I can't connect to sql server 2005 from my asp.net web page. I seem to be able to connect to it when i run the application from within visual studio but i can't connect to it when i run the application from IIS.I am new to sql server 2005 express so please bear with me.The error message i get is: Cannot open database "Vets" requested by the login. The login failed.Login failed for user 'OSCAR2K4ASPNET'.I don't know where this user OSCAR2K4ASPNET came from but i looked in sql server 2005 and there he is. In the left hand pane I went to Security and then logins and found oscar2k4asp.net there. I went to the properties for this user and went to User Mappings. There was no tick next to my Vets database so I added one and ran the application from IIS. I also added the user to every single role in the vets database (including dbowner). I also went into the vets database itself and found the oscar/aspnet user and made sure he was added to every role. I ran the application again. This time i got a lots of different errors. If the page was trying to run a select procedure I got the error user does not have select permission. If the page was running an SP i got the error or user does not execute permission I have never had this problem before so I don't understand.Where did this user come from? Was he created automatically when i configured my database for membership and roles? How do i set up this user so he can access the databsae from IIS. The only way I could get the application to run from IIS was to go to Security - Logins for sql server and add the oscar2k4asp.net user to the sysadmin role. I find this very strange. Naturally i don't want to leave oscar2k4 in sysadmin. Please help :) I can't upload my website until i fix this Thanks, andrea
View Replies !
How To Deploye SQL 2005 Express With My Application
Hello,I have an application that uses SQL Server express. I'd like to be able topackage the SQL Server Express set up file and deploy it with my applicationbut all the searching I've done only tells me how to deploy SQL ServerExpress manually (i.e. how to set it up yourself). I can script my set upto see if an instance of SQL Server Express already exists but if itdoesn't, I'd like to know the best way to deploy this on the target machineautomatically.Any help or direction would be greatly appreciated.Thanks!Rick
View Replies !
Can Flash Work With SQL 2005 For Non-web Application?
I am not sure if this is the right folder to post, but currently I'm considering using Flash as an interface, the application at www.mobik.com seems impressive, simple and sweet. But I'm wondering if I can build desktop application with flash and SQL2005 as backend for all the processing. at the same time, the flash shall be getting updates from a server. Possible?
View Replies !
Application Role And SQL Express (2005)
Hello, Can I confirm whether pooling=false in the connection string is still required for SQL Server 2005 (Express Edition)? Various google searches say pooling has to be turned off for SQL Server 2000, but I was just wondering whether it is still a limitation for SQL Server 2005 Thanks John
View Replies !
Problem In VB6 Application With SQL Server 2005
I have got a VB6 application where I update local SQL server table from MS Access table with code like that: ---------------------------------------------------------------------------------------------------------------- Dim rst As ADODB.Recordset Set rst = New ADODB.Recordset rst.Open "SELECT * FROM Table1 WHERE [Fld1]=" & v1, Cn, adOpenKeyset, adLockOptimistic 'check if exist if not exist create new If rst.EOF Then rst.AddNew rst("Fld1") = v1 rst("Fld2") = v2 rst.Update End If rst.Close ---------------------------------------------------------------------------------------------------------------- On rst.Update I have got an error message that the server has to be added to syservers as linked with stored procedure sp_addlinked srever. Why? Anyhow I executed the stored procedure then I've got error message 16933, "The cursor does not include the table being modified or the table is not updatable through the cursor." I had to rewrite the code to "INSERT INTO (Fld1, Fld2..." and it works. Is something wrong in SQL Server 2005 installation or any other reason? Please help.
View Replies !
Powerbuilder 9.0 Application Connection To SQL 2005
Hello- I have a Powerbuilder 9.0 front end application trying to connect to a SQL 2005 database. Now in my registry it looks like this DBMS =MSS Microsoft SQL Server 6.x DBPARM= PacketSize=2048,Log=0,AppName='AccessONE',Host='AccessONE' ServerName=a1prod First , is this possible to connect to SQL 2005 using the drivers from Powerbuilder or do I need to setup my own DSN in ODBC. If so what should my connect string look like to connect to SQL 2005 Any help would be greatly appreciated Shanon
View Replies !
Remote Connect To Sql 2005 With A .NET Application
We're building a client application (vb.net, with Visual Studio 2005) that will need to connect to a remote SQL 2005 server. Each client will connect from somewhere on the internet, so no client will be in the same domain as SQL 2005 server. We've been reading about Webservices/Endpoints and things like that. But we still don't really know what the best method is to connect to a SQL 2005 server from a remote client somewhere on the internet, with regards to security and speed. The application is a kind of CMS system, so data-traffic could be pretty heavy sometimes. I hope someone can help us with ous problem. Thx in advance!
View Replies !
MSSQL 2005 Express For Web Application?
Hi, I'd like to get the experts' advice on whether SQL server 2005 Express edition (SSE) is suitable for medium scale web applications. I have looked through the reviews of SSE. From what I understand, its limitations over the MSSQL 2005 Standard are: 1. SSE limits database size to 4GB and memory to 1GB. 2. Support for only 1 CPU. 3. No analysis or reporting services. 4. No full text indexing 5. No SQL Agent. I have a web application that is currently running on a shared web host with a shared MSSQL 2000 database. I'm thinking of shifting to a Virtual Private Server, where I can install SSE for free. Currently my app has about 14,000 page views a month, and each of them pulls out data from the database. I don't use any analysis or reporting services, or full text indexing or SQL Agent (for now). My questions: 1. Is 1GB memory sufficient for this type of application? 2. Is there any reason I should not be using SSE for my type of application? Thanks in advance for the help.
View Replies !
ASP Application Becomes Slower In SQL Server 2005.
Hi all, My ASP application is running fast in SQL Server 2000. But when we shifted it to SQL Server 2005, it becomes very slow. I have created the indexes also. There is lot of data in the tables. Is there any option to build the indexes for previous data. Please help.... -Shah.
View Replies !
Microsoft Management Console Nice Update!
Hi, There is a tool you can install it to change the behavior of the Management Console, when you double-click on a table it will fire the Return All Rows command instead of the Properties command. I already saw this change but could not know where to get it from, any one of you know it? Thanks,
View Replies !
Management Console In Enterprise Manager Error
hi, I always get DR Watson fir Window NT when I test Operators under the Management console. I have created a new operators and when I go to the property to test the email and the pager notification, I get Dr Watson and Sql Server Enterprise disappear. I am not sure what is going on and if there is someone knows what is going on,please let me know thanks for your help Ahmed
View Replies !
Execute Process Task / Console Output
I'm just starting to find my way around SSIS, coming from SQL 2000 DTS, but I can't see a way of including a Win32 Console application's output into the logging process. I've started playing around with SSIS Logs (OnTaskFailed etc..), but I can find no where to allow me to capture the output from a console app. In SQL 2000 DTS I could capture this by specifying an "output file" on the advanced tab of the job step definition. Is there something as straight forward as this in SSIS ? I'd be grateful for a few pointers in the right direction.
View Replies !
TSQL Runs Differently In VB NET And Enterprise Console
Hi!<br><br>A larger SP runs ok in console. When called in VB NET 1.1, results get turncated and some thing don't run at all. The connection is ODBC. Small SP's run ok.<br><br>Is this default behavior or something common? Are there VB parameters to let a larger SP run without interruption?<br><br>-Bahman<br><br><br>
View Replies !
Database Engine Not Displayed By Management Console
I have sql server 2005 express installed on an XP machine. When I browse for a database engine, SQL server 2005 management console displays machinenamesqlexpress in the local tab, BUT in the network tab only the machinename is displayed. Thus, I cannot connect to express from a networked machine. Any help would be appreciated. TIA, Joe
View Replies !
|