zackasan's Q&A profile
Windows Forms we got an error "operator is not valid for DBNull and type Integer"
we got an error "operator is not valid for DBNull and type Integer" when i enter nothing to the datagrid cell.Now i somtime i want to enter nothing in some datagrid cell If Not JvGrid.Item(counter, 2) Is Nothing And Not JvGrid(counter, 2) Is DBNull.Value And Not JvGrid.Item(counter, 2) = 0 And Not JvGrid.Item(counter, 3) Is Nothing And Not JvGrid(counter, 3) Is DBNull.Value And Not JvGrid.Item(counter, 3) = 0 Then MessageBox.Show("Invalid Entry ") Exit Function End If i would try it like that first, ( counter replaced with 0 here for my purpose) compare to item.value If Not Me .Item(0, 2).Value Is Nothing And Not Me .Item(0, 2).Value _ ...Show All
Windows Forms AddNew (BindingSource)
hi how i can edit value of one column when add new row using bindingNavigator and bindingSource Hi, I'm not 100% sure this is what you asked, but here we go: What I did was add my own handler for the AddNew button on the BindingNavigator (also make sure to set the AddNewItem property on the BindingNavigator to (none)). In my Button_Click event handler, I do something like that (bsBagLabels is my BindingSource): Me .bsBagLabels.AddNew() Me .bsBagLabels.Current.Item( "LABELTYPE" ) = "GABARIT" Me .bsBagLabels.Current.Item( "LABEL_COLOR" ) = "BLANC" Me .bsBagLabels.Current.Item( "CUSTLOGO" ) = "" Me .bsBagLabels.EndEdit() ...Show All
Audio and Video Development iHDSim "-cs" option is not implemented?
I noticed the presence of a new "-cs" commandline option (to force case sensitivity for resources) listed in the help dialog, but it seems to not be implemented yet. Is this the, uh, case iHDSim ignores the case of filenames on the disk... If references in the playlist+manifest+markup are consistent with each other but the disk filename is cased differently, the simulator runs fine. Just rename a file from a working project to test. ...Show All
SQL Server SSIS OLE DB Source Error
I am creating an OLE DB Data Source in an SSIS Data Flow - it is calling a SQL Server 2005 stored procedure, which accepts 3 parameters and returns a result set, but I get the following error: "There is a data source column with no name. All data source columns must have a name." I have have tested the output of this proc a million times, and every column has a name! I am also able to call a different proc in the same way, without error: EXEC pProc @DT = '20060928', @Id = 1015, @Debug = 0 Any ideas what could possibly be causing this error - assuming all of my columns DO have names Thanks : ) Mary, Please could you post your sproc up here. I'm trying to repro ...Show All
Visual Studio 2008 (Pre-release) Setting keyboard focus to fullscreen window
Hi! I have a window that is most time hidden (I call Hide()). When I show it, I want to be in fullscreen mode, so I set WindowState = Maximized and TopMost = True. The problem is that the window doesn't get sometimes focus (the previously active application gets the keyboard messages). I tried to call Activate(), but it didn't resolved anything. Is there a certain way to set TopMost, Maximized, and to show a window in order to gain focus Thank you try setting topmost=true, maximized, and Show() in a delegate dispatcher.Invoke(dispatcherpriority.applicatidle, delegate...) ...Show All
.NET Development How to retrieve value from UDT column written using CLR Integration (C#) ?
Hi there, Any knows I have created my own User Defined Type in SQL Server. I wrote it using C#, compiled to DLL, and registered on SQL Server 2005. I created a table that uses this UDT. Now I want to select from that table using DataAdaptor and Dataset. How should I define the column type in DataSet How can I use this UDT type to "SqlCommand.Paramater.Add" so that it will fill the DataSet for me Thanks very much!!! The column type is the type of the UDT (such as Point). SqlParameter can handle UDT value, what you need to do is to specify the SqlDbType as Udt and provide UdtTypename. SqlParameter param = cmd.Parameters.Add("@p", SqlDbType.Udt); param.UdtTypeName = "dbo.Point"; ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Music loop
I want to add the music to be the background music. But when I try to change the LoopEvent in xact it show an error "Object reference not set to an instance of the object". How can I solve this problem Please help me. thank you He's actually not writing any code. He's using Xact to setup his music bank. Looking in the Xact forums, it seems this has been a common error, that until recently the Microsoft team had been having trouble recreating. You can learn more about it in this thread here and they include the solution as well to get you going. I hope that helps! ...Show All
Windows Live Developer Forums File Does Not Exist Exception on Zoom and/or Pan
I get a File Does Not Exist Exception on Zoom and/or Pan randomally on the VEMap control. To reproduce add the following html to an asp.net project and catch the exception in a global.asx file. <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml" > < head > < title ></ title > < meta http-equiv ="Content-Type" content ="text/html; charset=utf-8"/> < script type ="text/javascript" src ="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></ script > ...Show All
Game Technologies: DirectX, XNA, XACT, etc. I can't find what I'm doing wrong!
[EDIT]Well, I finally got it to work. What was wrong I don't know. I did get it to work simply by adding a weight variable into the vertex definition, but am not sure why, simply becuase that had not worked before (yes, I had defined them as 1 before). So, no more help needed, I guess... Perhaps you should start with the tutorials included with the DirectX SDK. The second Direct3D tutorial draws a triangle. The tutorials are located in yoursdkinstalldir \Samples\C++\Direct3D\Tutorials. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Proprietary FBX format
Good day! According to an Autodesk engineer I communicated with today, "The ascii version of the FBX file format isn't publicly documented and subject to change." I think that begs the following question: why would we want to use a format that isn't open-spec, subject to change, and proprietary to a single company (Autodesk) What attraction does FBX have given its highly proprietary format To preempt a conversation about the merits of the build content pipeline, I might add that there are some companies that have no intention of using the content pipeline to avoid the embrace, extend, destroy philosophy which manifests as vendor lock-in. So to return to the prior question-- what is the sell for FBX if it is proprietary, cl ...Show All
Smart Device Development How to convert simple desktop application to smart device application?
How to convert simple desktop application to smart device application Can it be done Of course it can be done - I've done it. However I doubt whether anyone could formulate a methodology. The main problem is redesigning the forms. Smart devices have much smaller screens. Smartphones have no buttons. I had to divide large forms into several smaller ones. If your app is complex, you'll probably have to re-think the whole GUI. I had much less of a problem with non-displaying classes. Sometimes I had used a method that wasn't supported by Windows CE, but there was always an alternative method or a simple work around. Just throw everything at the CE compiler and work through the error list in the time-honored m ...Show All
SQL Server Internet Explorer Version 7.0 Beta 3 can not load Reporting Services
Hi, all! Internet Explorer Version 7.0 Beta 3 can not load Reporting Services, please check this error. Because my company always using Reporting Services. I open report OK but when choose and click View Report. Nothing load and IE 7 using a lots resource RAM. And I check many computer set up IE 7. they still error. Please help me. Thanks. http://blogs.msdn.com/bwelcker/archive/2006/08/28/728739.aspx ...Show All
Visual Studio Visual Studio 2005 sp1 on Vista RC1
I have installed sp1 on Vista RC1 and got interuptions warning about compatibility I am wondering if I should just install .net Framework 3.0. Will this rid and, correct the compatibility issue. DKB I have done exactly what you explain to do. I made certain I followed the correct install procedure. DKB ...Show All
Windows Forms Dataset designer problem using sql IN clause
I have a query that works just fine agains the database using an in clause. where id in (5,6,7) However, when I try to use the dataset design and build a query using a in clause the designer is apparently looking at the data type of id and only allow me to pass in a valid integer for the parameter for the in clause. where id in ( ) I have tried change the parameter definition and actually specify that the parameter is a string but it still complains. Anyone know how to fix this Thanks I think I'll open up a ticket with microsoft and see if I can find anything out. I'll post something here if I do. Thanks for taking the time to read and respond. I agree a stored procedure w ...Show All
Visual C++ Using SendMessage(HWND,MESSAGE,0,0), Linking error
Hello, i am using the : Send Message function (in windows.h), when i include windows.h in my header file it gives about 200 - 300 warnings, but it works, but when i then use: SendMessage(HWND_BROADCAST, message, 0,0); it gives some weird Linking Errors.. 1>Meas.obj : error LNK2028: unresolved token (0A0000AA) "extern "C" long __stdcall SendMessageW(struct HWND__ *,unsigned int,unsigned int,long)" ( SendMessageW@@$$J216YGJPAUHWND__@@IIJ@Z) referenced in function "extern "C" long __clrcall SendMessage(struct HWND__ *,unsigned int,unsigned int,long)" ( SendMessage@@$$J0YMJPAUHWND__@@IIJ@Z) 1>Meas.obj : error LNK2019: unresolved external symbol "extern "C" long __stdcall SendMessage ...Show All
