madenci's Q&A profile
SQL Server Conversion fails. Please analyze error msg.
Msg 245, Level 16, State 1, Procedure CompactL1RecordsFromfirstINTRAD, Line 177 Conversion failed when converting the varchar value 'DECLARE rows_cursor CURSOR FOR SELECT ask, dateTimed FROM iDay_Compr_GOOG WHERE DAY (dateTimed) = ' to data type int. I get this message while executing a stored procedure. It works "half way" but skips this statement and the whole block as a result. In the table @table_name ask is declared as float and dateTimed as DateTime. Similar statements work happily in other stored procedures with no problem. Even in the same stored procedure I have places where I use DAY (dateTimed) and they seem to work as far as I can see although it is a very branched out code with many IF ... ELSE's. SET @SQL = 'D ...Show All
Windows Forms VS 2005 crashes when adding a typeconverter for a custom struct
Hi, I've created a datagrid control that inherits another datagrid control. I've added a property called BackgroundGradient, which is of type GradientModel, a struct I've created myself: [TypeConverter(typeof(GradientModelConverter))] public struct GradientModel { private Color colorOne; private Color colorTwo; private LinearGradientMode linearGradientMode; public static readonly GradientModel Empty; public GradientModel(Color one, Color two, LinearGradientMode mode) { ... } public Color ColorOne { ... } public Color ColorTwo { ... } public LinearGradientMode Mode { ... } } Now, since I want this property to be available at design time, I've created the GradientModelConverter c ...Show All
SQL Server Task Priority
Hi, In my Sequence container task, I have 3 data flow task ( one data flow task is based on the constraint option Expression). 3 are running simultaneously, is there a way to assign a priorty which one should finish first before the other starts. If I make all of them in one sequence then the conditional task come in between which may stop the execution of the 3rd task depending upon condition. Please Guide. That's a dead link for me I'm afraid!! So, I'm still not understanding what it is you want to do. If the execution of some task is dependent on some condition then put an expression on your precedence constraint. This is discussed in much greater detail here: http://www.sqlis.com/default.aspx 306 If you w ...Show All
Windows Forms Why VisibleClipBounds not return with pagunit?
I put a breakpoint to the following code from a form method to see whenever I change GraphicsUnit from any one like inch,millimeter,pixel, It always return the sizef with pixel unit.why VisibleClipBounds should return rectangle with pageunit private void OnPaint(object sender, PaintEventArgs e) { Graphics grfx = e.Graphics; grfx.PageUnit = GraphicsUnit.Inch; SizeF sizef = grfx.VisibleClipBounds.Size; Pen pen = new Pen(Color.Black, 1 / grfx.DpiX); grfx.DrawRectangle(pen, 0, 0, sizef.Width, sizef.Height); } Help me.I am confused. IT SEEMS TO BE A BUG IN VS2005 (or in .NET 2.0) You are correct both. For VS2005 Graphics obtains change of PageUnit property only once - after the Gr ...Show All
.NET Development How to get the max length of text field in a DataSet?
I have a DataSet bound to an Access database. Is it possible to get the maximum length of a text field of a table in the DataSet Many fields in the database tables have maximum length values set in the design view in Access. When I examine the loaded DataSet in the VS 2005 debugger, I can't find any maximum length information anywhere in the DataSet or the "DataTable.Columns" objects. I wrote the schema of the DataTable to a file (using WriteXmlSchema) and I see that the XML schema does not contain maximum length information for any fields. I want the maximum length to validate user input on a form. Currently, if a user enters too much text for a field and trys to update the database, an exception is thrown stating: "T ...Show All
Visual Studio 2008 (Pre-release) MediaElement performance problem
Hi, I have a MediaElement in my application, which loads videos one after the other. My problem is that my application also has a ticker which is hand-built due to problems with TranslateTranform and clipping (which is another problem that I'll post about) and it is affected by the mediaelement. My problem is that as a video is being loaded, just before it starts playing, the CPU usage jumps and as a result the update thread in my ticker doesn't get enough time and the ticker basically freezes for half a second. Once the video is playing everything runs fine until the next video is loaded and played. There is nothing particularly complicated about the ticker but I was wondering if there was a way to ensure the MediaElement doesn't think it ...Show All
.NET Development There was an error while trying to serialize parameter
I tried to write a simple WCF example: With datacontract: <DataContract(Namespace:= "http://MyPhoneBook" )> _ Public Class LE <DataMember()> _ Public m_name As String Public Sub New ( ByVal name As String ) m_name = name End Sub End Class and servicecontract <ServiceContract(Namespace:= "http://MyPhoneBook" )> _ Public Interface IPhoneBook <OperationContract()> _ Function getLE() End Interface The implementation of the server returns a simple Test-LE: Public Function getLE() As Object Implements PhoneBookContract.IPhoneBook.getLE Return New LE( "Test" ) End Function I generated the client proxy with svcutil. So, when I start server ...Show All
SQL Server Pushy Matrix
Hello, I've encountered an issue with a couple of reports and am wondering if anyone has any information on this. I have found a work-around, but would like to know what causes the issue, so maybe I can address it in another manner. As standard procedure in all my reports, I have a graphic at the top which is set to Fit Proportional and has a width which is 1.25" shorter than the total width of the report. The same height as the image and filling the remainder of the report width next to it, I place a textbox with a simple expression to provide the time the report was run with a small custom message using the Now() function. Below these two items is another textbox which contains the report title. This textbox typically spans th ...Show All
.NET Development MSXML 4.0 vs. MSXML 6.0
Hi All, I am about to develop an application that has to utilize either MSXML 4.0 or MSXML 6.0. One of the requirements is that the application cannot require users to install .NET framework on their machine. My question is, if I use MSXML 6.0, does it require .NET framework to be installed Thanks in advance Hi , i'm using MSXML3.0 in COM based appliaction that will be Server environment as i found that msxml provides garbage collection, so i changed "FullGC" to "NoFullGC", but it is not working. can u please give me a suggestion what are the steps i need to take care of while using msxml (IXMLDOMDocument* ) & IXMLDOMDOcumentPtr. ...Show All
Visual Studio Custom syntax coloring for C++
Are there any built-in options in Visual Studio 2005 enabling custom coloring (function names, custom types, etc.) If not, are there any add-ins with such functionality CK Neither one ;-( What I'm trying to do is to have functions in the regular C file colored to be easier to recognize. So instead of: void foo() { return ; } I'd like to have: void foo () { return ; } My emacs can do this :-) Regards, CK ...Show All
Visual Studio Express Editions dataset and datagrid problems
i have a db (access file) i draged a datagrid and connected the thing to the dataset in wizard it automathicly gave me this line in my load function this .workersTableAdapter.Fill( this .db1DataSet.Workers); now i see the rows inside the grid, but i cant seem to change them (when i reopen the program, the rows are the same they were) if someone here knows the subject and can give me some pointers that could be great (if that someone has an email address, icq, or msn, even better, maybe i could even send it to them if they would rather see it with their own eyes) no idea in that case. I know the dataset can save data and the schema to xml: theDataSet.WriteXml( "Path\filename.xml "); ...Show All
Architecture Internal classes
Can anyone tell my where I find information about implementing classes inside other classes For example: Class Outer { Class Inner_1 { } Class Inner_2 { } } How to let the outer class use the inner classes How to let the inner classes use the outer class How to collaborate between inner classes On beforehand thank you - dampbarn Hi dampbarn, here I have an assortment of links I hope you find all useful. First of all I want to say that the fact a class B is defined inside a class A doesn't imply that any instance of A holds an instance of B, except if you declare a B class member inside A The idea of nested classes (also known as inner classes) i ...Show All
.NET Development ICorDebug and "Debugger Users"
HI, Recently I started Visual Studio.NET under an account that was not the member of "Debugger Users" and it didn't work. It's Visual Studio.NET feature or a requirement for debugging managed/unmanaged code under Windows Requires ICorDebug to be run under "Debugger Users" Thankx What account are you running as What account is the debuggee running as Users can generally debug programs in their own account. For example, a guest account could debug another process in the same guest account. Basically, if you can escalate your process to have the DebugPrivilege and call OpenProcess(PROCESS_ALL_ACCESS) on another process, you can completely take over that process. You ...Show All
.NET Development XML Reading Problem
Hi, I'm loving what you all can do with C# but i'm currently new at C# with the use of XML. I'm making a project and i'm saving info in a XML file since for me its the best choice for storage because i don't wanne use access databases or SQL or MYSQL. So i'm trying a bit but i'm stuck now. I got a bit code to read a xml file well its rather a long and simple way but it does. But my error is that i get this error, System.Xml.XmlException: 'Element' is an invalid XmlNodeType. Line 8, position 4. at System.Xml.XmlReader.ReadEndElement() at PlayGround.Form1.button1_Click(Object sender, EventArgs e) in C:\Coding\C#\PlayGround\PlayGround\Form1.cs:line 36 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button ...Show All
Visual C# Interger Type problem
StreamWriter sw = File.CreateText(paraColumnFolder + paraColid + "-" + (intCurrentPage-1) + ".htm"); Why (intCurrentPage-1) becomes "21" instead of "1" when intCurrentPage is "2" in value and it is of integer type. Sorry Tom, but there does not seem to be any problem with the code. I have tried the following snippet and it works fine. It created a file "NAME-1.htm" in my C: drive. using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { class Program { static void Main( string [] args) { int intCurrentPage = 2; System.IO. StreamWriter sw = System.IO. File .CreateText( "C:\\NAME" + "-" ...Show All
