ozhonetech's Q&A profile
Windows Forms Problem with BindableAttribute
I have a class (BindTestClass) that inherits from ComboBox and has a public string as a property of the class (BindableString). This string is bindable, so I can bind it in design time to a datasource. public class BindTestClass: ComboBox { private string _bindableString; [Bindable(true)] public string BindableString { get { return _bindableString; } set { if (value != _bindableString) _bindableString = value; } } } This is used as a control inside a form that has some text boxes binded to the same data source, but to different fields. All the controls in the form use a binding source as datasource, and the binding source has the actual dataset and datamember declared on it. When I hit save, the fi ...Show All
SQL Server R
Hello - I have a report based on a query that currently uses the = operator and I'd like to change it to the LIKE operator and allow a wildcard...using the %. So...from something like, "....WHERE zipcode = @ZipCode" to "...WHERE zipCode = @zipCode plus the wildcard character. Is this possible Thanks, - will Thanks for the replies. I ended up using a stored procedure and just concatenate the '%' to the incoming parameter. I could not get it to work with an inline sql query in my report....and besides, I was planning on using stored procs anyway. ...Show All
Visual Basic Why is debugging (step thru code) so VERY VERY slow?
I'm baffled as to why my debugging is so incredibly slow then I step thru the code line by line -- I have no watches and even the most simple of code (i.e. NotFound = True) will have a delay. I'm not running any virus software to slow it down either, so I'm VERY confused. Doesn't seem to matter if it is a Web App or Windows Forms app. Also, sometimes my debug sessions will step thru faster (still not speedy, but acceptable) than other times and I can't seem to find anything to help me determine why My hardware is pretty good stuff - two 3Ghz Xeon's with 4GB RAM and 10,000 rpm Raptor drives. Any hints on how to make this dog do do of VS IDE any faster Using VS 2005. Try closing down the Locals ...Show All
SQL Server Change results
I have created query As shown: SELECT distinct [Table] FROM [Database] The results i get back are A, B & C. What i am trying to do is show a result as a different word. i.e instead of displaying A is shows in drop down list as Apple, B shows Banana. etc. Can anyone help please. Thanks Duncan: It sounds to me like what you want to do is to join to a translation table to do a simple lookup; something like declare @source table ( sourceKey varchar(8)) insert into @source values ('A') insert into @source values ('B') insert into @source values ('C') declare @translate table ( sourceKey varchar(8), xlate varchar (10)) insert into @translate values ('A', 'Apple') insert into @t ...Show All
Visual Basic How do I do that ?
Hello. A question please. What the correct way when I want to return data from a method of a class To use out parameters, reference parameters or to return data on the name of the function (method) Thanks... Thanks... And if I must retrieve 2 o more informations For example a connection. One for retrieve sqlconnection and another one for retrieve if the open has succesfully (true and false). ...Show All
Windows Forms Datagridview combobox after update
All, I have a datagridview bound to a datatable with a combo box column and a text box column. When the user selects a value from the combo box I need to update the text box column with a value based on the selection from the combo box. Can anyone help Thanks in advance You can capture the value in the CellValidating event then use a line of code like this to set your textbox. text1.text = dgv.CurrentRow.Cells[x].EditedFormattedValue; I found that index of the dgvcbc seems to be at the end of the dgv even if you insert it into the middle. Give it a try. ;)~ ...Show All
Visual Studio Express Editions Send data to form based on selection in datagridview
I have a datagridview on one form that present companyID, CompanyName and CompanyLocation from my database and want my users to select one row and duble click on it to open another form where the data will be presented in textboxes. Right now the datagridview is read only and Selection mode is Full row select I want something like this If user D.klick Row with CompanyID 3 then Open Form2 and populate txtCompanyID with companyID 3, txtCompanyName with Companyname where companyID is 3 and so on. I appreciate any help I can get. /Rikard aka Biocide Hi, Add InitializeComponent() to the constructor Public Sub New ( ByVal ForetagID As String ) InitializeComponen ...Show All
SQL Server Ideal number of join
Hi What should be the ideal number of joins that should be used in a query In some books it says anything beyond 7 joins should be re-considered. Is this correct. We have application where the number of joins are more than 25 and in some cases it is beyond 50. I am looking for some guidelines as it will help to design the table in the best possible way. I am not looking for reporting type of queries; instead they are all the business logic. thanks Sanjay I have experienced problems when the number of joins around 255 joins. However, a poorly designed architecture or query can have problems with just 1 join. ...Show All
Windows Forms Datagrid problem
Hi, I have a datagrid that display the information of a table and i have create a relation with a child table. So basically the datagrid can display the information of the main table and have a link that can navigate to the child table's data. So now my problem is like this, If i want to put the value of the seleted row's data from the main table i can assign like this. did not understand what u exatly want but anyway chek that out: http://www.vb-tips.com/dbpages.aspx ID=267dc562-3a88-4d84-a700-61f05736a7fa ...Show All
Software Development for Windows Vista MemorySource Filter? Does one exist?
I need to be able to use a memory buffer as a source for my directshow app, but I can't seem to find any source filter that works on a pointer etc. Any ideas how I should approach this Would I need to write my own source filter If so, any tutorials you can suggest for writing one Prefably in C# not i guess it'll be in C++. I'm using DirectShow.Net for C# if it makes any difference. They all work with pointers. look at the 'fill buffer' method. You may be able to use this filter . http://directshownet.cvs.sourceforge.net/directshownet/directshowlib/Samples/Misc/GSSF/ ...Show All
Visual C++ DateTimeCtrl in different language
Hello, I am developping a multi language program. How to have the calendar in a DateTimeCtrl in different languages. Because I have it only in my Windows language. Thank you, Christophe Jacquelin, hi, Cjacquel what do you mean by "multi language" I guess your term "windows language" refer to the windows SDK that bundled with operating system. if you want to use CDataTimeCtrl, try to change the project setting to use MFC as a shared dll, then simply include header file "afxdtctl.h". Thanks Bite ...Show All
SQL Server SQL 2005 Enterprise to 2005 Standard
We have a situation where we installed the Enterprise version of SQL Server 2005 on a server that is now in production and we had intended to install the standard edition (what we are licensed for). We have enterprise licenses for other servers so we have both types of media and it was a mistake that was made. I was wondering if there is a way to downgrade the version without uninstalling and reinstalling and having to backup and restore all the databases, jobs, SSIS packages, etc. Any suggestions or help would be much appreciated. Thanks, John Nay. Microsoft is quick to tell you how easily you can upgrade from one version to another ... downgrading though (with the exception of license rights) is ...Show All
Visual Studio 2008 (Pre-release) Error when trying to generate model
I get the following error when trying to generate a model (csdl) file. ERROR: Unable to generate model due to the following exception: The store metadata has not been generated yet, please call GenerateStoreMetadata() first. Any suggestions Thanks, Sandy Hi Lee - I don't know that copying the DLL from the vpc will work, as it is just one of the .net framework 2.0 DLLs that should have been updated. At this point, I'd like to verify that you indeed do have a different System.Data.dll than what we expect. Another thing that you could try that would be interesting is to try to generate the model using the EdmGen.exe. This should be located in %WINDIR%\Microsoft.Net\Framework\v3.5 directory. It is ...Show All
.NET Development Math library...
Hi, I'm looking for the codes used to implement the exp function in C# and C++ library. Where could I find the bit of codes. I'm looking for that because I need to optimize these function for an application. Thank you for your help. Best regards, Florian DEMOIZET The source code for exp() is not published. Closest thing you got is tran.lib in the VC\crt\src\intel\dll_lib folder. Math.Exp() just uses the CRT version of exp(). Optimizing the performance of exp() would be a long shot, this kind of library code is heavily optimized. Noteable is that it uses SSE2 instructions when the CPU supports them. ...Show All
.NET Development How to make force my dll to be loaded in the beginning?
I have a .NET dll and I want every .NET executable referencing to this dll should load it at its start up. Assuming I dont have any controll over the applications built over the dll, is there anyway I can enforce this restriction from the dll side Assembly.GetEntryAssembly() will find the .exe assembly and Assembly.GetReferencedAssemblies() will find the referenced assemblies. Maybe this will help. ...Show All
