bbbbbbbb's Q&A profile
SQL Server SQL SERVER TEMPORARY TABLES in STORED PROCEDURES
There are two ways to create a temporary tables in stored procedures 1: Using Create Table <Table Name> & then Drop table ex. Create Table emp (empno int, empname varchar(20)) at last : drop table emp 2. Using Create table #tempemp ( empno int, empname varchar(20)) at last : delete #tempemp ---which one is preferrable & why. what are the advantages & disadvantages of the above two types. Non temp tables can be only created by on user during execution time with the same name. Temp Tables are created per Session, so every user executing the procedure will have its own table. It think that ...Show All
.NET Development updating records
I am trying to update a record using one of samples provided and I always have the following error: "Reference to a non-shared member requires an object reference" The code I use is as follows: Dim totalsRow As mdstats1DataSet.TotalsRow totalsRow = mdstats1DataSet.Totals.FindByRecordID(1) totalsRow.smtpin = smtpin totalsRow.smtpout = smtpout The error is on the "mdstats1DataSet.Totals" Can anyone help me BTW, I am using VB Express and SQL Express Assuming that I'm reading your issue correctly, you need an instance of mdstats1DataSet . (In order to a ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to get multi devices through directinput, Thank you!!
As the titile If I have two joysticks or two keyboards in the computer How to get the press event of the two devices... Thank you!! Which language are you accessing DInput via (C#, VB6, VB.Net, C, C++...). I'll assume you're dealing with DirectInput8 as that's been the current version for years now In my experience it should be as simple as creating multiple IDirectInputDevice8 objects - one for each device you wish to work with. The relevant SDK samples show how to enumerate what devices are attached to the system. Just bare in mind that, for joysticks, XInput complicates things a little wh ...Show All
Visual Basic Programming Challenge since u re great guy
For this challenge, you'll need to write an algorithm to find your way from one corner of a field to another as fast as possible. You will be given a starting point and an ending point, and you'll need to tell us how long it will take you to get from start to finish. The field is a grid, and you can only move up, down, left and right. Each move of one grid square takes 1 second. Unfortunately, there's also walls in the way.....the rest is here: http://www.scm.ca/programmingchallenge/maze.htm No No I m not joking That s a question some body received before a job interview, I m not sure about the difficulty of the problem ...Show All
Windows Forms printing text
I am trying to print a text file and am using the examples provided by Visual Studio. The following line calculates the number of lines per page in the PrintPage eventhandler: lpp = ev.MarginBounds.Height / printFont.GetHeight(ev.Graphics); The problem is that lpp calculates a number of lines but the printer is printing past the margins and I miss 2-3 lines per page. If I subtract 4 from lpp this works but why isn't the calculation correct The event is listed below: //Event fired for each page to print private void pd_PrintPage( object sender, PrintPageEventArgs ev) { float ...Show All
SQL Server genral network error on .net framework 1.1 using system.data.sqlclient in asp .net
hi i am using asp .net 1.1 i have deployed my application on server where sql server 2005 exists but if i try to connect to sql server from my development machine then it is not connecting and gives me error when conn.open() in my sql server it is windows authentication. the error is general network error check network docs. i have tried timeout=0 and pooling=false but neither works please answer. what should my connection string. you're in the wrong forum for this question. this forum is for SQL Server 2005 Mobile Edition. I'd recommend one of the ASP.NET MSDN Forums for this question. Darren ...Show All
Visual C# Where to Declare array in class?
Hello, i recently started learning C#, and have a small question to ask, any help would be much appreciated ! i'm writing a class for storing a 2-D String array (storing student details). The number of students is entered by the user in another class, so the size of the array size needs to be set during runtime. I've got this so far: public class Students { // CONSTRUCTOR public Students(int numberOfStudents) { string[,] details = new string[ numberOfStudents, 10 ]; } // EXAMPLE OF USING THE ARRAY (doesn't work) details[0,0] = "Student1"; } The trouble is, this means i cannot use the string array outsid ...Show All
Software Development for Windows Vista How to implement custom IReferenceClock Interface.
How to implement custom IReferenceClock Interface. I want to provide my own clock to the VMR9 filter graph. I cannot make any sense out of the methods, and how filter graph manager uses those methods to decide when to present image. Does any one have the sample This is the empty stub that is created during basic implementation: public class ReferenceClock : VMR.IReferenceClock { #region IReferenceClock Members public int Unadvise(int dwAdviseCookie) { // TODO: Add RefrenceClick.Unadvise implementation return 0; } p ...Show All
Windows Forms System.argumentexception thrown when "foreach( Apprleader.LeaderRow row in myleaderRows)"
Hi all, System.argumentexception was thrown when code was running at line foreach( ApprLeader . Leader Row row in myleaderRows) ( breakpoint ) Line after anove line; ... I debugged in code and set a breakpoint at the line righ behind it. I found that every column in "row" threw System.argumentexception, and the message was "column 'column_i' does not belong to table 'Leader', while 'myleaderRows' contains the correct data. Here, ApprLeader is a class in ApprleaderDS.designer.cs, which was generated by the tool from the dataset file ApprLeaderDS.xsd; Leader is a datatable, and LeaderRow is the Row in tabl ...Show All
Visual Basic Attempting to add a datasource
While in vb.net express, I still can't make a connection to the sqlexpress database when I attempt to add a new data source. I have tried everything. This is the error message I get: Unable to open the physical file “c:\Program Files\Microsoft SQL Server\MSSQL.1\Data\Master.mdf”. Operating system error 32: “32(The process cannot acces the file because it is being used by another process.)”. An attempt to attache an auto –named database for file c:\Program Files\Microsoft SQL Server\MSSQL.1\Data\Master.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. I have no problem ...Show All
SQL Server Connect same database in the CLR store procedure
Hi everybody: I have a urgent problem, and can not google any useful answer. Please help me! In my CLR store procedure, I have used a context connect, and I want to creat another connect to the same database. I have set the database permission to external, creat asymmetric key in my assembly, and creat login for that key. The dbo is the owner. When I use this connect string as store procedure input, and I opened this new connect in the CLR sp, it throw an exception --"***.MDF is in used, failed to connect"!! How can I do Thank you very mu ...Show All
Visual Studio Code reorganization
I Work in an environment with a lot of code that was written by previous contractors. These contractors have placed methods all over the files and we want to be able to reorganize our classes. For example, place all methods together, all event handlers together, all module level variable declarations together and maybe alphabetize them. I was wondering if there was something either in CodeDOM or DTE that I am missing that would help me create a macro that will allow me to reformat/reorganize the code in the current code window. Thanks in advance for any direction on this matter... Thank you Carlos.  ...Show All
Visual Studio Tools for Office Open and Modify Word Document from C# .NET 1.1
I'm trying to open a Word document from a VSTO project using C# in VS 2003. When I attempt to launch a copy of Word, I get an "Access is denied" error. This project works great if you manually open the Word document specified for it, but if you try to launch Word and open the document from C#, it's a no-go. So what am I doing wrong All help is appreciated. Thanks. Could you post the code that you are using to open the word document and the call stack and exception information you get when this fails. You may also find this page useful. http://msdn.microsoft.com/library/default. ...Show All
Visual C# Compilation error after migration to VS2005
I have a rather big solution developed in VS2003. Trying to convert it to VS2005 I get compilation error: "Could not load type for namespace_name .Global" for Global.asax page. I don't use App_Code directory in my project. The file Global.asax.cs containing needed class is situated right next to Global.asax file in the same directory. In Global.asax page I have the following directive: <%@ Application Inherits=" namespace_name .Global" Language="C#"%> In Global.asax.cs the class is declared in the following way: namespace namespace_name { public class Global : HttpApplication { // the body of the cl ...Show All
Windows Forms Drage and drop image into imagebox.
hey, can anyone tell me how to make it so I can drage a image into a image box What I want is so once you click on the image it stays there but creates it self to be dragged in to imagebox59 and it will center it automaticly to make it fit perfectly... It is a program that will let you make emotion icons, and I need it so you can do this stuff...so thanks I using Visual Basic 2005 express Thanks a lot for this knowledge. For the next 15min, I hate MS becaus I searched for PictureBox1.AlowDrop = True for > 4 houres. Only experts have done a difficult code, I dont understand. Thanks again ...Show All
