slein's Q&A profile
Windows Forms method with list of parameters
hi every body i am working in class that bind database with my application and i need to know how to make method that accept list of parameters (to execute Stored procedure with any number of parameters ) pleeeeeeeeeeeease i need help i need it to be liek that x.ExecuteStoredProcedure(storedprocedurename ,LIstofParameters ) Hi m_3ryan , here is an article about pass list/array to sql, hope it would help you:) http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm ...Show All
Visual Studio Express Editions printing items from database
I am attempting to print items from a database. I have added the items as objects to an array list. When I click print preview, the items show exactly as I intended them to be. The final calculation in the preview is correct. However, when I do the actual printing, the calculated number (TotalPremium) doubles Sometimes, the items print more than once. Why is the print preview correct, but the actual printed page is not. Please see attached code. Thanks for your help. Dim RatingFont As New Font( "Tahoma" , 8, FontStyle.Regular) Dim LineHeight As Decimal = RatingFont.GetHeight yCoord1 = e.MarginBounds.Top xCoord = e.MarginBounds.Left yCoord2 = yCoord1 + LineHeight yCoord3 = yCoord2 + LineHeight yCoo ...Show All
SQL Server Trigger
hello team: i have two tables order and orderdetial, i want from the orderdetail the sum of the quantity of products for each order and then insert this sum in order table infront of each order this is the first part: declare @s decimal select @s=sum(f.quantity) from orderdetails as f inner join orders as a on a.orders= f.orders group by f.orderdetails any one have advise, thanks lot Re ask : my question is : i have master and detail tables , the pk of the master used many times as fk in the detail table, i want to make for ex a trigger to get the sum for a feild of the fk then insert this sum in the master table in feild total like productid and store ...Show All
Visual C# How to read a float from a Big Endian binary file.
I have a binary file written in big endian. Scattered within the binary file, there are 4-byte floats that I wish to read. I can't use methods like ReadSingle() since it is in big endian format. The only thing I have found to solve this is to read it in one byte at a time...reverse the order of the array...write it out using BinaryWriter and read it back using BinaryReader.ReadSingle() from the temp file. This seems to have a lot of over head...is there a better way to do this (I tried the way below but did not work) Thanks. -JRozak FileStream fs = new FileStream(openFileDialog1.FileName, FileMode.Open, FileAccess.Read);BinaryReader r = new BinaryReader(fs); float x=(float)IPAddress.NetworkToHostOrder(r.ReadUInt32()); ...Show All
Visual Studio Express Editions problem with \ in string c#
Hi all, we have product developed in non microsoft technology which invode a c# exe passing the required parameter as command line argument. I am getting a file path say "c:\test.rpt" as commnad line argument when I receive it in c# it is appending @ at the beginning of the string like @"c:\test.rpt" . What could be the reason and how to resolve it. Thanks Girish I'll move this to the C# forum for you. Are you sure this is the case As a string literal, you'd show that string in C# code as you've rendered it, or with a \\, @ in front of the quotes means that \ means \ and not an escape character. So, are you seeing this in a debugger, or are you writing it to a f ...Show All
.NET Development Performance?
Hi there. I have a performance related question: in the following 2 examples, why would I use one over the other Any one offers better performance / security, etc 1. string newString = string .Format( "{0} and {1}" , thisString, thatString); 2. string newString = (thisString + " and " + thatString); Completely disregard for now the obvious extras that the Format method provides (composites, numeric and date formats, alignments, etc.), also the trimming of the 2 parameter strings, this is pure string appending and the end result is exaclty the same, so why one over the other Thank you Would operations on string literals be String operations or StringBuilder operations I would like to ...Show All
Visual Basic SQL STATEMENT Select, where * problem
I have what appears to be a simple query but I have having major problems The Query that works is: SELECT * FROM Mutual WHERE (Ticker = 'axiax') When I change it to the following it does not return any results: SELECT * FROM Mutual WHERE (Ticker = 'ax*') I think I have tried every combination of "" and spaces and can't get anything to work. I am running Visual Basic 2005 Express Edition, SQL Server 2005 Express, and it is a Access 2003 database (.mdb) Please help. Beautiful, perfect thanks! I was taking that right out of "Deitel Developers Series" Book Visual Basic 2005 I guess they made an error ...Show All
Software Development for Windows Vista Separating Serviced Components from Data Access Components
In Christian Nagel’s book "Enterprise Services with the .NET Framework", he talks about separating serviced components from components that perform data access. This way the serviced components are really just wrappers that call other components that perform the real work of interacting with the database. The data access components don't contain any Enterprise Services related attributes. He uses the following simple example to illustrate this point: Serviced Component A --> Data Access Component B --> Database. I am wondering if anybody has experience with complex scenarios like this: Serviced Component A --> Data Access Component B --> Data Access Component C --> Data Access Com ...Show All
Visual Studio 2008 (Pre-release) Problem with EnumValueDescriptionConverter used in a GridView
Using the EnumValueDescriptionConverter presented by Josh Smith here: http://www.infusionblogs.com/blogs/jsmith/archive/2006/08/29/835.aspx, I'm trying to create a GridView with Person data: Name and Title. Title is an Enum, and should be presented in a ComboBox in the GridViewColumn. There's no problem creating the list if I don't use the converter: A Combobox with Title items is created for each person. However - if I use the converter (to show the description for the items), the combobox is only shown for the first person in the list! Here's my xaml: < Grid > < Grid.Resources > < ObjectDataProvider x:Key = " titles " MethodName = " GetValues " ObjectType = " {x:Type local:Title} " > < ObjectDataProvider ...Show All
Windows Forms what should we use for validating users input
Hi, I think Microsoft gave up MaskedEdBox control in .Net. What should we use in order to validate users input like for users to enter only dates or numbers or...... I meant the Activex MaskedEdBox . My need is to validate that a user enters a postal code format like: H4C 4G3 or a string of only caracters and no numbers Thanks. ...Show All
Visual Studio Express Editions Autocomplete Combobox
I'd like to mimic Access's autocomplete combobox with the NotInList event. User can start typing and if the text exists it will appear... if it does not and user hits enter, an error messagebox "does not exist" is shown. Please can someone help direct me to a solution in C# in the designer view, click on the combobox to bring up its properties. There is a property there called "AutoCompleteMode" - you may wish to play with the settings here to see if it will do as you are asking. In addition to this, the "AutoCompleteSource" must also be set to "ListItems" for example Hope this helps! ...Show All
Visual Studio Express Editions Linking error message....
<hr style="width: 100%; height: 2px;"><hr style="width: 100%; height: 2px;">Hi, I'm trying to compile an application that I got online and when linking I get the following message:Linking...LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corruptCVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409Any idea how I can solve this problem Thanks a lot in advance for your help!! Alejandro. It seems like you may be presenting the linker with a corrupt file - you should ensure that all the files in the program have been recompiled for Visual C++ - in general you cannot mix *.obj files built with difference compilers. ...Show All
Visual Studio Help With Installing Visual Studio 2005 Professional
Could someone please tell me step by step what I need to do in order to install Visual Studio 2005 Professional. I have downloaded the En_vs_2005_Pro_90_Trial.img file but from here I am completely lost. I am looking for some way to install this program into my computer without having to purchase the ISOBuster software or possibly any other software for that matter. I am a total newbie to any sort of file like this (.img) and just about everything I have read concerning it confuses me. I do have a CD burner but I don't even know how to use it, so when I read about burning the VS2005 file to a CD I am lost here also. If someone could explain in laymen's terms how I can install this file into my machine I would greatly appreciate it ...Show All
.NET Development ! Possible System.NET bug? SocketException when performing Async download in Async thread
(The following is a bit long, but it details what I think might be a bug in System.Net) Our application uses WebRequest to perform asynchronous downloads. Things work just fine on almost everyone's machine, but we are starting to get error reports back from some users in the field. We looked at their call stacks from our logs and saw this: Exception Information Details: ====================================== Exception Type: System.Net.WebException Status: ConnectFailure Response: NULL Message: Unable to connect to the remote server Data: System.Collections.ListDictionaryInternal TargetSite: System.Net.WebResponse EndGetResponse(System.IAsyncResult) HelpLink: NULL Source: System StackTrace Informa ...Show All
SQL Server Size of Nulls
Hello Friends I was just going through the size occupies by the datatypes of sql server but i am wondering how much size a NULL can occupies can any one suggest how much NULL s occupies a hard disk.. space and also the method to find out the size occupied by NULLs Thanks in advance.. Paresh. Hi, When calculating the size of a record you need to take in account some rules. For null values you need to reserve at least 2 bits. http://msdn2.microsoft.com/en-us/library/ms189124.aspx (see point 3) Greetz, Geert Geert Verhoeven Consultant @ Ausy Belgium My Personal Blog ...Show All
