qwv's Q&A profile
SQL Server Filename Variable Trouble
I want have multiple records from 1-4500 that I must insert a picture into the database for. I am trying to set up a variable to do this if someone can show me my error I would apprieciate it. This table has 4 columns (id# Float is a FK) (ImageName nvarchar (10)) (ImageFile Varbinary(Max)) (rec# int PK Increment Seed). declare @jpg as int Set @jpg = 0 While @jpg < 4500 begin set @jpg = ( @jpg + 1 ) use consumer insert photo ( id# , ImageName , ImageFile ) Select @jpg , ' @jpg.jpg' , bulkcolumn from Openrowset ( Bulk 'D:\Data\Pics\@jpg.jpg' , Single_Blob ) as 'ImageFile' My image name is the ID# in a jpg file format. ...Show All
Visual C++ Error C2582 when creating a new struct
Hi, Within a namespace, have declared a new struct like so: public ref struct moveLine { int moveCount; array <move^> ^moves; }; Have declared a member of a class with this data type like so: moveLine m; // note that putting "^" brings up a compile error and in the constructor of the class, I try to implement it with the following code: m = gcnew moveLine; Have also tried this with moveLine(). This line raises the following error: Error 2 error C2582: 'operator =' function is unavailable in 'moveLine' progHead.h 57 Am very tired, and can't figure this out - can't work it out from MSDN documentation either. Hope you can help. Cheers, Fritz ...Show All
Visual Studio Viewing reports hosted on report server 2005 from asp.net 1.1.4322
Is there a ReportViewer Server Control that can be used to view reports from a 1.1.4322 ASP.NET web application, where the reports are hosted on ReportServer 2005. Hi, I am using the samples Report Viewer for .net 1.1 framework , which talks to 2000 and 2005 report server using URL access method and runs fine. The report viewer control for 1.1 is not providing me the required security as it makes a direct connection from client browser to report server and thus I have to run the report server under annonynomous access else it pops up a dialog box for user credentials. Can someone you please help me , how to modify the code to add windows authentication in it so I do not need to run the web ap ...Show All
.NET Development CompilerParameters.ReferencedAssemblies issue
Hello, I have a C# assembly that compiled in memory using CodeDomProvider.CreateProvider("C#"). I use CompilerParameters.ReferencedAssemblies to add the referenced assemblies by passing a filename as arguments (e.g. MyAsm.dll). For some reasons, the C# compiler cannot find my custom assemblies eventhough they are registered in the gac. It does find the .NET ones though such as system.dll. Why is that I don't have these kind of problems with the Boo compiler which seems to look up the gac for referenced assemblies. thanks for your help. -mab You're trying to do this in an ASP.NET app then. Are you hard coding the path or using the HttRuntime.CodegenDir The path that you gave is actua ...Show All
.NET Development Problem when accessing/enumerating MSMQ with .NET v1.1
Hello, i am working with the MessageEnumerator class. I use the MessageEnumerator.MoveNext() method to enumerate through all the messages in a message queue. Depending on the content of each message i remove it from this queue or not with the MessageEnumerator.RemoveCurrent() method. Then i (try to) dequeue a new Message from my queue again with MoveNext(). The while-loop (should) work until there are messages in the queue. My code looks something like this: ... enum.Reset(); while(enum.MoveNext()) { //check message and depending on the content of it call enum.RemoveCurrent(); ... Thread.Sleep(100); } ... The problem: If there is a new message been enqueued to the queue from another thread/progra ...Show All
SQL Server Using a XMLA query to generate reports
hi, I am trying to join a cube that is deployed to XMLA using Deployment Wizard with a report template i created using reporting services 2005 but could not figure how to join the XMLA query (SSMS 2005) of a cube and the report template (SSRS 2005) made. I am hoping the readers could provide some info or some link to where the procedure is explained return xmlns="urn:schemas-microsoft-com:xml-analysis"> <results xmlns=" http://schemas.microsoft.com/analysisservices/2003/xmla-multipleresults "> <root xmlns="urn:schemas-microsoft-com:xml-analysis:empty" /> <root xmlns="urn:schemas-microsoft-com:xml-analysis:empty" />   ...Show All
Visual Studio Tools for Office How to group the shapes within Excel Worksheet from VB.net ?
Suddenly stucked with simply question: How to group the shapes within Excel Worksheet from VB.net (2005) It's easy from within the EXCEL (VBA) - Set myDocument = Worksheets(1) With mydocument.Shapes .AddShape(msoShapeCan, 50, 10, 100, 200).Name = "shpOne" .AddShape(msoShapeCube, 150, 250, 100, 200).Name = "shpTwo" With .Range(Array("shpOne", "shpTwo")).Group .Fill.PresetTextured msoTextureBlueTissuePaper .Rotation = 45 .ZOrder msoSendToBack End With End With However it's appear to be impossible to use the same construction from VB.NET - array in this way is not supported. The idea is to create ShapeRange with several Shape(s),- but method like "Add" ...Show All
Visual Studio How to create a EnvDTE.Command in a VSPackage
How can I create an EnvDTE.Command in a VSPackage (not an addin) I have the following code but it requires an instance of an Addin EnvDTE80.Commands2 commands = (EnvDTE80.Commands2)dte.Commands; object[] contextGUIDS = new object[] { }; EnvDTE.Command myCommand = commands.AddNamedCommand2( dte.AddIns.Item(0) , "Mycommand", "Mycommandbuttontext", "Executes the command", true, 59, ref contextGUIDS, (int)EnvDTE.vsCommandStatus.vsCommandStatusSupported + (int)EnvDTE.vsCommandStatus.vsCommandStatusEnabled, (int)EnvDTE80.vsCommandStyle.vsCommandStylePictAndText, EnvDTE80.vsCommandControlType.vsCommandControlTypeButton); The dte.Addins.Item(0) is empty of course as I do not have an Addin, how can I get around this ...Show All
Windows Forms Menu Shortcut keys doesnt work When invoked from VB6.0 Forms
Hi, I have a .NET C# Winforms that will be invoked from a VB 6.0 client. The problem i face is when the .NET Winform is displayed the Menu shortcuts in Winforms is not working. The code i use in VB6.0 to display the windows form is Private Sub Form_Load() Dim comp As MyComponent.MainApp Set comp = CreateObject("MyComponent.MainApp") Me.Hide comp.Show End Sub Where MyComponent.MainApp will be winforms class i will register this using Regasm and invoke it from VB 6.0. I have to display this form using Show alone and not as a ShowDialog() [ While using showdialog the shortcut keys works perfectly ]. Since i need to make the VB form too show and hide [ As VB is modelless i cant use show from .NET form to make visible the mo ...Show All
Visual Studio Testing for Null in RDLC Report Field
In .net 2.0, vb.net, I am trying to display a strPhCell phone number char field, from a DataSet, using the Format() function. The Format works fine, but whenever there is NO Phone Number, the string "#error" displays on the report. I have tried every way I can think of to detect a Null or blank, but nothing works. Someone on ExpertExchange suggested the following ... which also does not work if there is no phone number. Can someone help =IIF (Fields!strPhCell.Value is nothing , nothing , Format(cdec(Fields!strPhCell.Value), "(###) ###-####" ) ) cgai Maybe for my response to make more sense, here is my actual binding string that I tried in the report's TextBox: =IIF(IsNot ...Show All
.NET Development ado.net table read
Hi, I have a simple question to ask. I can't find it thru the search in the forums, so I post a new thread, sorry. I want to connect to the database, and much of my queries would be simple table read, like read a single record by key, or read multiple records from the same table (single). Should I use stored procedure, or just use tabledirect, or inline sql. I would mostly use MS Access, and sometimes SQL Server for larger data requirement. Eugene Thanks. For the case of MS Access, performance is not an issue. The main concern is manageability/maintainability. In this case, I assume I would need to create alot of stored procedure/querydef, at least one each for each table. Is this correct Is ther ...Show All
Visual Studio Problems with visual studio 6.0
Hi! Having some problems with my visual studio 6.0. It worked fine a couple of days ago but now all of a sudden I cant start it. I get an error message that says. ** AppName: devenv.exe AppVer: 6.0.81.67 ModName: msenv.dll ModVer: 6.1.81.71 Offset: 000105fd ** Tried to reinstall but the same problem. Tried this but same problem: http://support.microsoft.com/default.aspx scid=kb;en-us;248675 Tried this but same problem: http://support.microsoft.com/default.aspx scid=kb%3ben-us%3b199272 Does anyone know how to fix this Tried other forums but no succes. Thats why I post this question here. Hi again! Tried SvenC's suggestion but no luck. Still get the same error when I use another user. Run ...Show All
Visual Studio Team System Kill connections prior to dropping database
Hi, I'm working on using VSTS4DBP as my deployment tool for databases and I'm excited about the ability to use it from MSBuild. So, I'm working on my deployment script and one thing I want to do is drop the database if it already exists prior to recreating it again. Hence, I clicked the "Always recreate database" button in the project properties which causes the following to go into the deployment script: IF ( DB_ID ( N 'MyDB' ) IS NOT NULL) DROP DATABASE [MyDB] ; GO That's all good except that if someone is connected to the database (which is a possibility) then the deployment will fail with the message: Error 3 Msg 3702, Level 16, State 4, Line 3 Cannot drop database "MyDB" beca ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Perspective Shadow Mapping
Hi all, I've read the Stamminger paper over and over again, but I still can't get my head around the concept. I've had no problems implementing simple shadow mapping (in fact the SDK example proved invaluable), but I'm at a loss as to how I'd implement perspective shadow mapping as described by stamminger to help correct some of the aliasing issues I'm getting. Can anyone describe the algorithm in plain english t.i.a Rob Meridy Thanks for the reply, I've come across that article before, and it does do a good job of explaining simple shadow mapping, but it only vaguely mentions the newer (c. 2002) technique of perspective shadow mapping. I understand and have implemented the technique of ge ...Show All
Visual Studio 2008 (Pre-release) Modifying default style/template for subclassed control
Hi, I would like to subclass the MenuItem class and add a HighlightBackground property which would make the highlighted background of the control configurable. Currently, the background can be set by using the Background property, but the highlighted background is hard-coded in the framework. My first approach was to use a Style and add a Trigger to set the background based on the property IsHighlighted. This did not work. My second approach was to provide a custom ContentTemplate for the control. I used the template for MenuItem posted in mshelp. This template, however, is not the one actually used by the class. The one used by the class displays a popup with squared corners and check marks. The mshelp version displays a popup with round ...Show All
