BriceIt's Q&A profile
Visual C# adding SQL records with a '
Hello, In my application I have an area where the user can freeform type information to be sent to a database server (or MDF on a few systems). if their text contains a ' the database complains that it is a bad SQL statement. I am using direct statements (INSERT INTO blah blah) instead of stored procedures as I cannot use stored procedures for this type of implimentation. is there a way that I can insert a ' into the SQL without it complaining such as an escape character or something Thanks, Quilnux, It's never a good idea to construct a query using user input directly: you are exposing yourself to wh ...Show All
Visual Basic Checkbox enables multiple fields
I have several groups of combo boxes with a check box next to each group. I'd like to make it so that if the user check the checkbox, the combo boxes will become enabled (they default to enabled=false). That wouldn't be so difficult, but in an effort to create what I'd consider more efficient code, I'd like to find a way to use the same routine to enable all of my groups of combo boxes by sending the name of the checkbox that was turned on into that routine, and then using some sort of dynamic evaluation to enable all of its related combo boxes. For instance my form has: checkbox (name: car_checkbox), combobox (name: car_manufacturer_c ...Show All
Visual C# Multiple updates to an Active Directory user in one pass
I'm trying to update a set of users in Active Directory from an Excel spreadsheet. This is how I'm doing it now: (oRow is a DataRow object) SearchResult result = search.FindOne(); if (result != null ) { DirectoryEntry user = result.GetDirectoryEntry(); if (user.Properties[ "employeeNumber" ].Value == null ) user.Properties[ "employeeNumber" ].Add(HashSSN(oRow[ "SSN" ].ToString())); if (oRow[ "First_Name" ].ToString() != user.Properties[ "givenName" ].ToString()) user.Properties[ "givenName" ].Value = oRow[ "First_Name" ].ToString(); if (oRow[ "Last_Name" ].ToString() != user.Pro ...Show All
SQL Server Set Primary Key when normalizing data?
Greetings all, I have created an SSIS package that takes data from a very large table (301 columns) and puts it in a new database in smaller tables. I am using views to control what data goes to the new tables. I also specified that it drop the destination table and recreate it prior to copying the data. The reason for this is so that old data removed from the larger database will get removed from the normalized databases. I have 2 things I am trying to figure out.. 1. I would like to have the package set a specific row in each new table to be the primary key (this will allow us to use relationships when querying the data). 2. ...Show All
Visual Basic Exe will not run on network drive
When I try to run a VB.net program I wrote from a Network drive, it receives this error: 'WindowsApplication1 has encountered a problem and needs to close. We are sorry for the inconvenience.'. If I move the exe anywhere on my local machine then it runs fine. Now I have admin rights to the network drive and folders. Any ideas thanks, Dean DeanRIowa, Did you reboot your machine after giving Local Intranet full trust Did you sign the assembly/assemblies that you want to trust Best regards, Johan Stenberg ...Show All
Visual Studio Third-Party Charting Products that work with ReportViewer?
Hi there, Does anyone know of third-party charting products that work with ReportViewer in local processing mode I've looked at Dundas and ChartFX, and I'm waiting to hear back from their sales & support people, but from all outward appearances those two products only work with reports that are generated on a server. Thanks, Eva Pierce Monsen Dundas, ChartFX, etc. are using the CustomReportItem feature of RS 2005 to integrate their products. The CustomReportItem feature is only supported through the report server and cannot be used in local mode of the controls. In local mode, the closest you ...Show All
Windows Forms DataGridView and Heterogenous cell types
Hi all, On the smart client developer center i read the following http://msdn.microsoft.com/smartclient/understanding/windowsforms/2.0/features/datagridview.aspx The DataGridView comes with TextBox, Image, CheckBox, ComboBox, Link, and Button column and cell types. Addition cell or column types can be easily implemented to extend your application. Columns and rows both support heterogeneous cell types. For example, you can have column of check box cells and have other cell types, like a button, in the same column Since this is exactly what I needed, I started searching for documentation and examples. Perhaps i did something wro ...Show All
Visual C# How to change start menu style without logging off?
Hi, I want to chage the Current Start Menu Style to "Windows Classic" thru code. I changed the registry value: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer ValueName="ShellState" I changed 32nd byte from 02 to 00. But I do not get the immediate change in start menu. I can see the radio button for start menu option changed in " Taskbar and Start Menu Properties " window. Is there any API to achieve this Can I manage this using any desktop related API Please help !!!! As this about Win32 and the Windows Api and not C# tou are probably best to post this on the Microsoft Newsgroups ...Show All
Windows Forms Addin (automation) Form lost input focus forever
If it is not the right place to post any addin (automation) posts, I apologize. I didn't find any addin related groups. I am building an addin which shows a Form using ShowDialog(), the form provides functionalities to: * add/remove ProjectItems from VS.NET Solution Explorer (under Source Control) * select/unselect/add/remove UIHierarchyItem Because the form is shown as a modal Form, normally it is the ForgroundWindow and has the input focus. But when it is adding item to source controlled Project, SCC Provider launches it's own dialog, and after that dialog dispeared, things goes bad: the input focus goes to VS.NET' ...Show All
Visual Basic [OTP] VB6 dbgrid link with listbox help!!!
hello i have a problem linking a dbgrid with a listbox, i dont know if it's possible but i'm trying to doit.. please can you help me.. i want when i move up with the keys in the list, in the dbgrid move up at the same time, and when i go down in the list in the dbgrid do it the same...the list and the dbgrid has the same number of items this is possible thanks, im in visual basic 6.0 These forums are for VB.NET and there are better places to find answers for older versions of VB. Maybe the VB6 newgroups - http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.vb.general.discussion&lang=en&cr=US Or per ...Show All
Visual C# Check whether string contains uppercase letters
I want to create a password validation method so i want to check whether sring contains at least 1 uppercase letter... how do i do this public void ChangePassword(string UserID, string oldPassword, string newPassword) { if ( IsValidPassword(UserID, oldPassword) ) { if (newPassword.Length >= 8) ...Show All
Visual Studio Team System CA1053 resolution question
I have a VB class that has no constructor and all Shared methods. CA1053 says that this is a bad thing. If I add an empty Public New() method, the message is still generated on the next analyze pass. If I change New() to be Protected or Private, I get items in the task list for each place where I create an instance of the class ( Private Sub New()' is not accessible in this context because it is 'Private' ). What can I do to make CA1053 go away and still have my code build properly Thanks, Mark Mark, If you have a class that only has shared methods, why do you need to create an ins ...Show All
Windows Forms Update a DataTable asynchronously
Hi, I have a DataTable in a DataSet connected to a DataGrid (the DataGrids DataSource is the DataTable). I want to update the DataTable one row at a time and this should be visible in the DataGrid (i.e. when a row is added to the DataTable the UI, the DataGrid, should be updated). The Data that is added to the DataTable is retrieved and processed& ...Show All
Visual C++ STL.NET serialization
Is STL.NET going to include anything from the C++ standard library or only the STL subset Are stream based classes going to be present in STL.NET Are there any known plans to port the Boost library to .NET managed My application must be 100% verifiable ! Using both CLI\C++ and STL.NET, what is the best method of implementing a serialization mechanism The aim is to serialize from an unmanaged application and de-serialize this same file into a seperate managed application We only want to use the .NET framework classes only if we are absolutely forced too! The reason being we may wish to port back to unmanaged if performance suf ...Show All
Microsoft ISV Community Center Forums Pass parameter to Form
Hi. Is it possible to pass a parameter to a form Im trying to design a lookup form and I need to pass a type array which will be used by the calling form later. Thanks. If your using Access then you can specify a parameter called [OpenArgs] to the DoCmd.OpenForm() command. In here you can pass a parameter to the form. Look up the help on that as I haven't used it often. Another way would be to add a public property to the Form. Create a new instance of the form, and set the property before you open it. Here's what I mean written in Excel 'placed in UserForm1 Public Property Get ArrayValue() ...Show All
