Nothingz's Q&A profile
SQL Server how to get the results of sp_stored_procedures in C# app?
The result of sp_stored_procedures and many others is a result set, a table, but this procedure and others return only an integer. How do I get the result set in C# code I need a general idea how it is done. Thanks. Are you looking for something like this: using (SqlConnection cxn = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Master;Integrated Security=True")) { cxn.Open(); SqlCommand cmd = new SqlCommand("sp_stored_procedures", cxn); SqlDataReader rdr = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection); while (rdr.Read()) { for (int i = 0; i < rdr.FieldCount; i++) { Console.Write(rdr .ToString() + "\t"); } Console.WriteLine(); ...Show All
Visual Studio Express Editions Run 3rd Party app from button...
I know this is probably a dumb question but i couldnt find an answer on my own. I have basically an "auto-run" program that runs diffrent setup programs for various freeware apps. This will be saved onto a cd.....and the drive letter may change so how do I make a program start when I click on a button The easiest way to startup another app from yours is to use the Process class and it’s Start() method. To start a new instance of the Windows Calculator for instance you’d simply fire off this line: System.Diagnostics. Process .Start( "calc.exe" ) Not only can it accept just the program name without a path (provided the file is contained within a path the system will automatica ...Show All
Internet Explorer Development Tiki wiki & IE7
I have a couple of sites running on IE6 and am considering moving to IE7. I opened the site on IE7 and I notice half my pages lose layout and style. This is specified in my CSS file. Does anyone know what's going on ...Show All
SQL Server Error "An attempt to attach an auto-named database for file"
Hi, I've just created my first projects using Visual Studio 2005 and SQL 2005 Express. This is the basic; One windows service is created that updates a database. The windows service running under "Local system" account One windows application where a user can see data (and change) from the database A common business and dataaccess layer/project is used by both applications Connection string to the database: "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Data\Database.mdf;Integrated Security=True;Connect Timeout=60;User Instance=True" Both application is located in the same directory. When the computer starts the windows service starts and works perfectly. But when a user starts the win ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DirectX Questions... Problems with .lib and ddraw.h
Hi, ... ... ... I use the Visual Studio 2005 Standard Edition, Visual C++ 2005... I've done some Windows programming and been using the GDI to make some graphics so far, it works well... But can anybody tell me how to Clear the screen after using the GDIs to draw some polygons... You see, the screen then becomes full of polygons, and that's what was wanted, but then, finally, how about Clearing the Screen completely and then start to draw some other, say, triangles instead... So, What is the exact Command to Clear that Window that the polygons were drawn in... ... ... ... OK, Now, here's the problems... I've finally started to get into Direct3D and DirectX... So, I've read and Understood all the materials about how to creat ...Show All
SQL Server UDM and Data Mart
I'm very new to SSAS. I'm reading the book "Delivering Business Intelligence with Microsoft SQL Server 2005". In page 53 (if you got a copy), it mentions that "UDM is a structure that sits over the top of a data mart ... one of the major advantages of a UDM, however, is that it does not require a data mart. You can also build a UDM over one or more OLTP systems." This really confuse me. It claims this is possible but I can't find any further works on this. Afterwards, data mart is created for demonstration. So, is a data mart really needed I want to skip creating data mart because I hope to keep thing simple. I don't want to use the Integrated service to ETL my OLTP database into data mart structure if it's not so impor ...Show All
Visual Studio 2008 (Pre-release) PNRP is not available
Hi I am trying to start a P2P application using WCF, and get the following exception when trying to open the service host: "System.InvalidOperationException : Resolver must be specified. The default resolver (PNRP) is not available." Any idea Elad. Hi, Not sure if you have tried this already, but does a ping from the Vista machines to any of hte XP machines work It might help troubleshoot better if you provide the ipconfig /all for all Vista/XP machines... -Shalini. ...Show All
Visual Basic inserting ascii data into SQL database
Hi everyone, I need to save the ascii data in my sql express 2005 database in one table and in 2 coloums in this table using VB express... Can I do it by datareader or with bulk insert t-sql command I tried it this way but it gives error like "connection property is not initialised" it is on executenonquery row in the code... Dim cmd = New SqlCommand( "BULK INSERT RFID.dbo.stock(material_number,total) FROM 'C:\can1.txt' " & _ "WITH FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' " ) connection.Open() cmd.executenonquery() connection.Close() I hope some can help with this problem.... ...Show All
SQL Server How to know if user have access to a specified DB
Hi ! I'm searching a way to know if a specified user have access to a specified database. For sure I may look with Enterprise Manager, but I'm searching a way by looking in System Table, or using StoreProc Where the Info about user and is Database access are store Any idea I'm using MSDE Zak Actually, when I went outside for a walk I realized that this doens't completely answer the question. A user could be aliased. Hang on and I will get you some more information. Sorry about rushing the answer. Dave ...Show All
.NET Development Page Faults
Hi! I'm view in my company server a .NET program with more than 1.089.457.000 page faults. The program run since 30 hours. I must worry Regards. Memory consumption is anormal too, 100 Mb aproximatly, and 150Mb of virtual memory. This code is write by another progamer, i can't view the code now. I know that he uses a lot DataSet, the program uses server sockets, client sockets, SQLOracleClient. I shutdown and restart the app, and now the memory consumption is more normal, but with few hours more will be anormal again. What could be the cause what could cause this horrible amount of page faults Regards. ...Show All
Visual Studio 2008 (Pre-release) InstanceContext initialization, IContractBehavior and IContractBehaviorAttribute
I want to basically hook into InstanceContext initialization and, via what little I could find in the documentation , IContractBehavior seems to be the way to do it. So, first question is: is this the right approach If so, the documentation for IContractBehavior claims that there are two ways to hook the behavior into the flow of things: Programattically to add it before ServiceHost.Open. Implement a custom IContractBehaviorAttribute. I'd rather not do option #1 because it just feels so anti-configuration/declarative which is what seems to be one of the great things about WCF. However, given the lack of documentation around IContractBehaviorAttribute, I'm lead to believe it's not a much better route because y ...Show All
Visual Basic I'm bored, so does anyone have any ideas on...
I'm bored with Visual Basic, so I was wondering, what do you people program in VB I'm just bored. I don't know what to do, but I want to use all this programming power. Any ideas Thanks. try learning C# - move on up the scale know about sockets/networking ever created webservices or use Xml ever created ASP.NET sites Worked with SQL Tried re-creating some games or some applications which already exist, but your own version Tried creating a client/server application Tried Windows Mobile Development ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA Game Studio Express - 8/30/06 ?
I "Hear" the XNA Game Studio Express will be available 8/30/06 - ( ) Is there a Specific Site that has More Info (Where and How to Download it, etc) I am Intersted in Porting some of My PC Games Over to the 360 ... http://games.archor.com ( ) You can register http://connect.microsoft.com/site/sitehome.aspx SiteID=226 for the Beta program today and then wait until the4 download is ready. Please notice that the Beta will not support the Xbox 360 yet. ...Show All
.NET Development A header/detail question
I think this is a classic scenario in system development and want to learn something out of it since I am completely noob here.Here's the scenario: ExamHeader DeptID Name autonumber Text ExamDetail DeptID ExamID Name Description Price Text Text Text Number I had two tables(ExamHeader,ExamDetail) on my access database.ExamHeader had columns DeptID and Name while ExamDetail had DeptID,ExamID,Name,Description and Price.What I want to achieve is when I add an exam(ExamDetail-Name) this exam would be belong on the department(DeptID) it should be.What would be the columntype of my DeptID in ExamDetail and do I need to create a query to accomplish th ...Show All
Visual C# Making a derived from CollectionBase class Thread Safe
I was wondering if anyone has any advice on how to make a class derived from the CollectionBase thread safe. The main problem I am having occurs when I loop through a list of objects in the collection. I generally lock the thread before the for loop occurs but some other piece of code is still able to modify the collection while I am looping. I have tried locking on the InnerList.SyncRoot, as well as locking on the derived class itself but stilll have problems. My guess is that my collection is receiving a clear command from another thread while I am looping. I am unable to override the Clear method in my derived class so I am not sure if that is the problem or not. Happy holidays, and thanks for any help you can give me. ...Show All
