regz's Q&A profile
.NET Development OleDbException on simple ExecuteReader call, with MS Access DB
When I execute the following code, I am getting a really annoying exception thrown at me which gives only the following information... An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll Additional information: No value given for one or more required parameters. The exception occurs inside of the ExecuteReader line below: string dbCommandText = "SELECT * FROM cust WHERE accountNum= "; using (OleDbConnection dbConn = new OleDbConnection(dbConnectionString)) { using (OleDbCommand dbCmd = new OleDbCommand(dbCommandText)) { dbConn.Open(); dbCmd.Connection = dbConn; dbCmd.Parameters.Add(new OleDbParameter("accountNumber", accountNum)); OleDbDataReader reader = dbCmd.Execut ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Render to Texture with moved camera
Hi, I'm trying to make a picture-in-picture sort of scene. I'm experimenting with render-to-texture and I have successfully rendered my current scene to a texture and placed it on the back buffer, but if I try to move the camera while doing this I get some strange artifacts. It looks almost like parts of certain quads are being clipped, but I can't think of any reason that would be happening. Basically here's what I do to render a frame to texture: 1. I set my new render target, setup render states, and clear the device 2. I adjust the camera and set the view transform 3. Render quads 4. adjust camera back to it's old position, set view transform 5. set render target back to the back buffer If the camera stays in th ...Show All
Smart Device Development New mail notification doesn't work, IMsgSto:Advice() + fnevNewMail.
Hello everyone, I am trying to get notification of a new incoming email event using CEMAPI under WM5.0. I call IMsgStore::Advice() with the flag – fnevNewMail but I don’t get any notification back. Other flags (e.g. fnevObjectCreated) do work. Is somebody knows how to deal with the problem Thanks, Asher Yes, I encountered the same situation with you, but basically, the mail what i want has a special format in subject text, so it isn't deathful. ...Show All
Visual Studio Express Editions I want to learn - How to use objects.
This is a really confusing subject. What I want to understand is after you've used a class to create multiple objects, how do you make sure that you are using the right ones to do things with I mean, for example; I create and object, how do I pass that object as information for another object Like if it was to become the property of some other object. If I had a region object and the region objects had store objects. How does something like that translate into code Any examples or even small challenges on creating an object and then so on would be very appreciated. I need some kind of little project that someone can give me and help me through with it to understand how this all works. I hope someone has the time. Thank you in advance for ...Show All
Visual Studio Express Editions Reading Lines in a Text File
Hi I currently have a text file (textfile1) which contains 40 lines. Each of these lines contain data stored in the following way: nameofthis = value nameofthis2 = value nameofthis3 = value What I would like to accomplish, is to read these values, with a variable assigned to each "nameofthis" variable. I thereby mean that the program should read each line, check what the name before the "=" is, and then check if the variable for this value exists. If it does, it should read the value after the "=", to the specified variable. For instance: TEXTFILE CONTENTS (textfile1): name = Johannes surname = MySurname email = me@myself.com PROGRAM: ' Variables Dim name as String Dim email as String ' Read the ...Show All
SQL Server Newbie questions SQL Server2005 Reporting Service-Urgent
I have a report parameter that will give choice to the user to pick 1 to 4 values as a input to run the report.For example if the user picked one option i have to assign other values as not NULL.Because my qurry is ANDing all input to get the result.For example if A,B,C,D are the user input,My qurry is doing A AND B AND C AND D. If any one input is null the result will become NULL.I can't substitute OR instead of AND . Can anyone help me to assign a default vale NOT NULL ,but it shouln't affect my requirement. Thanks Masi sounds a little strange to me,..... Basically on report params you add a new parameter, I take i tyour param is not query based. You then assign you f ...Show All
Visual Basic How to get "References" to show up in the Solution Explorer again...
In VS 2003, under each project, there used to be a tree node for "References", so you could change/view them on the fly. Now, in 2005, that tree node is gone. The only way I've found that you can get to project references is by opening MyProject and going to the References tab. Is there any way to get the tree node back in the Solution Explorer so I can see my references without opening MyProject P.S. I've noticed that the "References" tree node still exists for C# projects. WATYF Ken Tucker wrote: If you press the show all files button in the top of the solution explorer the references node will be shown Excellent... that's exactly what I needed. Thanks. WATYF ...Show All
Visual Studio Team System Blank Test View and Test Manager
I've got a requirement that forces me to use msbuild to compile my managed C++ test projects (don't ask). Rather than dropping out to the command like to compile we've converted our vcproj file to be a Makefile type project and then put our MSBuild commands into the NMake section of the project file. It compiles fine and the tests run fine with MSTest: I pass it the compiled DLL and the testrunconfig file, so that's a non-issue... The problem is in the IDE when I have Makefile for a project type: it tells me there's no Tests in the project: Test View and Test Manager are empty no matter how many times I refresh them... they attempt to reload themselves, but they never get populated. When I have the same bits with a non-Makefile vcpr ...Show All
Visual Basic Saved and used again?
How do i do this I want to play the file selected by the user from the list box. Which is saved to My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData. sUserSelected not sure if this is right or not. The way I have it is not working, I've also tried using & instead of + but no luck. Dim sUserSelected as String Player.URL = "C:\" + sUserSelected + "\ThemeTune.mp3" I want to play the file selected by the user from the list box. well, how are the items placed in the listbox do they contain the full path or just the name of the file the syntax you have for the player is correct, I am assuming you are using the WMP SDK What errors do you get when ...Show All
SQL Server procedure of function to show free space to a file
Any idea of a function or procudure the returns the free space of a data file so I can see when I need to reclaim free space. sp_spaceused Displays the number of rows, disk space reserved, and disk space used by a table in the current database, or displays the disk space reserved and used by the entire database. Syntax sp_spaceused [[ @objname = ] ' objname ' ] [ , [ @updateusage = ] ' updateusage ' ] Arguments [ @objname = ] ' objname ' Is the name of the table for which space usage information is requested. objname is nvarchar(776) , with a default of NULL. [ @updateusage = ] ' updateusage ' Indicates whether or not DBCC UPDATEUSAGE should be run within the database (when ...Show All
SQL Server What's the easiest way to copy tables from one 2005 DB to another 2005 DB?
I've tried creating a simple SSIS package but I get the error: [Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..". THis is a known bug and while we wait for SP1 to fix this error, is there another way to simply copy tables (with indexes and without having the identity column renumbered) Any help is appreciated! Philippe, Thank you! That worked perfectly....and now I have a SSIS package as a base for future uploads. I did discover that the wizard doesn't preserve the "allow identity insert" check if you also select the "optimize for many tables".....must be a b ...Show All
Visual Studio 2 problems with V1 release
1. Showing context menus gives an OLE error 2. The version of TxtTemplating is 8.1 not 8.2 (unlike what the migration guide says) and I get a warning about inconsistent versions. Rest of product looks good 1. I solved this by referencing 8.2 version of all assemblies. TextTemplating assembly is not (why ) directly pickable from .NET tab. But you can find it manually and select in Browse tab.In my case it is in directory C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.TextTemplating\8.2.0.0__b03f5f7f11d50a3a\ Second way (i suppose to be right) is to hand-edit .csproj file. ...Show All
.NET Development Add Business Object to ArrayList
I have an Order than can multiple sub orders.....I want to save my sub orders to an arraylist....i have a class called sub orders that has all the data pertaining to that sub order....How do i add an entire class to an arraylist so that if i have multiple sub orders they will be based in as SubOrders[0], SubOrders[1], and so on... can someone point me in the right direction...My goal is to have my suborders stored in an array list... Tryin2Bgood wrote: So making the _SubOrder as an ArrayList I will not need to bind it like so Since the class now will be represented as an index in the arraylist and if the index changes or is modified thats when my _IsDirty will return true or the Event will fire using my implem ...Show All
SQL Server Bulk insert Remote Files access denied
Here is my setup. Machine A: SQL Server 2005 x64 on a Windows Server 2003 x64 Machine B: XP Pro SP2 with SSMS installed Machine C: hold files that I want to import to Machine A. The drive is shared and set for everyone to read. Everyone is logged in as Admin and SQL services are start up under the admin account. I'm using Windows Authentication to log into Machine A from machine B. When I try to bulk insert from query analyzer running on Machine B BULK INSERT ModelData FROM '\\MachineC\Data\Files\Something.txt' WITH ( FIELDTERMINATOR = ',' , ROWTERMINATOR = '\n' ) I get Operating system error code 5(access is denied). I have looked at the examples shown from the BOL links provided but I just have a small workg ...Show All
Visual Studio Team System System.NullReferenceException : Object reference not set to an instance of an object.
Hello. I am using the TestDriven.NET add-in in Visual Studio 2005 and only have a problem testing my database methods, but not my business methods. I have a database class inside a class library that contains all static methods, but yet I am getting an error for not creating an instance of an object. My tests are in a separate project. Here is the output when trying to run a test on a static DB method: TestCase 'TestFTPProjects.FTPTestCode.TestDistinctMIO' failed: System.TypeInitializationException : The type initializer for 'ACHDBLayer.ACHDBComponents' threw an exception. ----> System.NullReferenceException : Object reference not set to an instance of an object. at ACHDBLayer.ACHDBComponents.getDistinctMIO() C:\FTP\IC ...Show All
