Karrar's Q&A profile
Visual C# #define INT_SIZE int32 support?
I have a counter that I need to easilly change between int16, int32, int64, float, double, etc when needed. In C I would use a define, but here I can not. I've looked into generics but that won't do because I need to be able to increment the int value and with a struct-generic input for the class that won't work. So how can I do then I tried using int btw but that made it so darn slow! "I need to easilly change between int16, int32, int64, float, double, " When does the type change should take place Ar compile time or at runtime ...Show All
Visual Studio Express Editions Issues with sub and dim
OK, I'm trying to create an application that writes a large amount of data to a file. But because there's a good amount of data (and certain sections are quite repetative), I'm passing arguments to a subroutine that has an "outline" of the basic data, which modifies a portion I specify. Here's an example: Private Sub Button1_Click(ByVal sender As System.EventArgs, ByVal e As System.EventArgs) Handles Button1.Click Dim inputio As StreamWriter = New StreamWriter("test.txt") Call writeit(22, "FOOBAR", 10) Call writeit(26, "JACK", 15) Call writeit(30, "NIGHTMAN", 18) Call writeit(34, "UBERNOOB", 22) inputio.Close() End Sub Private Sub writeit(ByVal color ...Show All
Smart Device Development Breakpoints causing connection loss on debug
What started out as a random problem has become a full-time issue. Attempting to run a WM 5.0 app causes a "The Connection to the Device has been lost, blah, blah, blah" error. Deleting ALL breakpoints allows the app to deploy and run perfectly. Breakpoints can then be set for debugging. Setting a SINGLE breakpoint before deploying, however, will now cause this problem. The larger the app became, the more prevalent the problem became until some critical point was reached...now it happens every time. VS2005 and ActiveSync have been removed/reinstalled. I've tried VS SP1 Beta and ActiveSync 2.5 Beta. I've tried several different devices along with the emulators. No change. Has anyone heard confirmation of this ...Show All
Windows Forms Datagrid index problem
I have a master/child datagrid. Both grids are bound to dataviews. Everything works find until I introduce a rowfilter on the dataview for the master. I can see the data but I get an argumentoutof range exception for the index paramater when either I change page or select a grid item. What gives here Can anyone point me to a decent article on what needs to happen Glad you solved the first problem. For problem #2, I'm going to recommend you post it to the WinForms Data Binding forum. It sounds to me like the issue lies more in that territory than ADO.Net itself (and I'm not as familiar with Data Binding). Post a new message thread there, since sometimes messages with a lot of responses don't have very ...Show All
Visual Studio Team System Strongly Typed DataSet analysis
Hi, It appears that VS2005 Code Analysis ignores the code in strongly typed datasets, probably because of the GeneratedCodeAttribute on the class. Is there anyway to force my partial class code or ideally, all of the generated code to be analysed I understand that some stuff in the auto-generated dataset code will violate CA rules but picking up naming issues and ensuring my extensions are valid would be very helpful. I've considered hand removing the GeneratedCodeAttribute from the .designer file but it will only be replaced when the file is regenerated from the source .xsd during a build. Thanks, - Jason You can find out a little more about these new features in Orcas, by reading the following post: ...Show All
SQL Server Which SQL priveledge is required for SQL user to execute DTS job?
Question regarding SQL Server 2005 (sp1) Hello, I need to give a domain user the ability of executing a DTS package from command line using DTS run and I needed to know what specific grants to give to that user to databaseA 1. I added a domain user (domain_name/user) to the SQL Server and granted ddl_reader/writer and admin role. 2. installed SQLclient on user machine and showed user how to execute dtsrun.exe command with /E. I am not sure if these priveledges are correct. can somebody guide me on this thanks, Jigar Hi. I just want to give the least amount of privs to a user to execute the DTS job. thats why I was asking. thanks, Jigar ...Show All
Smart Device Development Upload file to Mobile Device
Hello, I have a c# application that runs in windows. It creates a table in a database and fills it in from a text file. Then I would like to upload that database to the Mobile Device which is connected to the computer via usb. I try o do the following but I get an error message stating the path cannot be found. File.Move("C:\\dbTest.sdf", " \\Storage Card\\dbTest.sdf "); Any ideas hadjici2 wrote: Hello, I have a c# application that runs in windows. It creates a table in a database and fills it in from a text file. Then I would like to upload that database to the Mobile Device which is connected to the computer via usb. I try o do the following but I get an error ...Show All
Visual Studio 2008 (Pre-release) How to determine weather systems is doing drag-drop?
hi all experts I'm facing a out of my mind problem scenarior like this I have a control (*) support DragDrop.dodrag (**) when user move mouse over it and hold pressing left button and the delta position > system defined barrier dragdrop Unfortunaltly, it contain a textbox(***) that support drag & drop too The system was crash when user click & drag constantly - fast - randomly on textbox Message of Unhandle exception: Dispatcher processing has been suspended, but messages are still being processed And the stack trace: e.Exception.StackTrace " at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)\r\n at MS.Win32.HwndWrapper.WndPr ...Show All
Visual Studio Tools for Office ContextSwitchDeadlock Error when trying to receive more the 5k records for excel worksheet
Hello we get the following error when trying to retrieve a large dataset for an excel worksheet. I saw that this can be disabled for debug exceptions but I am assuming that's in vs2003 not 2005 as i do not see that option. We have written this in vb.net is there a sample to shut of the mda during runtime Is this a good idea for a release of a product Thanks in advance. John Error: The CLR has been unable to transition from COM context 0x15a540 to COM context 0x15a260 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may e ...Show All
.NET Development Modifying Access query from .NET
We have application where we need to be able to update the access 2000 queries at startup of applications. How do I do that programatically I can do Drop Procedure and it does drop the query in Access but Create Procedure doesn't work. Here is the code I am using. Here is the where I call the CreateQuey sub. m_ModifyQuery.Sqltxt = "SELECT CaseManagers.[First Name], CaseManagers.[Last Name] FROM CaseManagers" m_ModifyQuery.CreateQuery() Here is the CreateQuery sub. Public Sub CreateQuery() Dim cmdUpdate As New OleDbCommand cmdUpdate.Connection = clsDB.BuildConnection cmdUpdate.CommandType = CommandType.Text cmdUpdate.CommandText = "Create Procedure &q ...Show All
Visual Studio Express Editions How can i kill a process?
o.k i i am trying to kill the iexplore.exe process what am i doing wrong here the code: Public Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ps As Process ps = Process.GetProcessByname( "IEXPLORE.exe" ) ps.Kill() End Sub i get this error: Error 1 'GetProcessByname' is not a member of 'System.Diagnostics.Process'. the funny thing is that the exact same code works with "getprocessbyid" tnx i now understand my mistake, i didnt know that this function works for arrys only. but your code still doesn't work it dosen't close all explorer windows.... and another question wha ...Show All
SQL Server Move and Rename File with File System Task
Hello I want to move and rename a file and embed the date/time into it, so that each time the package runs a new file is created. For example MyFile_20060712_150000.doc. Can someone give me a hint how to do this with the File Systen Task SSIS Control Flow Item Thanks for an early reply Regards Chaepp Just an FYI - have you checked out Rafael's post on this http://rafael-salas.blogspot.com/2007/03/ssis-file-system-task-move-and-rename.html ...Show All
Internet Explorer Development "Requested lookup key" IE7 Problem
Please help! I just set up my new PC with Windows XP and after installing IE7, when i try to go on any website it launches a pop-up, stating "The requested look up key was not found in any activation context" and doesnt launch any webpages. Yet Mozilla Firefox works fine. Please reply back with a solution anyone :o) -Callum Ok.. I found the solution... its the tabbing page of IE7 that is causing the upgraded IE6 to give the 'lookup key error' Basically after installing xp pro, It runs like IE6, but with IE7 engine behind. So the only solution is to uninstall IE7 manually to revert to IE6 interface: see link below (method 2) : http://www.lockergnome.com/nexus/blade/2006/12/21/how ...Show All
Visual FoxPro Scripting Visual Foxpro Database
I want to generate a database creation script that is Transact-SQL compliant for a Visual Foxpro database. The code generated by the Gendbc program will not run if I execute it in SQL Server for instance. Is there any way I can do this using Visual Studio 2005 Or is there a tool that can facilitate this process I am writing a program (in C#) to dynamically create a SSIS package that will transfer a Foxpro database to SQL Server 2005 Express and will need to generate a script dynamically when the user points to a source Foxpro database. Any ideas Visio Enterprise Architect will also allow you to forward engineer a Foxpro database and create a SQL compliant script. You may also want to look at Stratrafr ...Show All
SQL Server procedure of function to show free space to a file
Any idea of a function or procudure the returns the free space of a data file so I can see when I need to reclaim free space. sp_spaceused Displays the number of rows, disk space reserved, and disk space used by a table in the current database, or displays the disk space reserved and used by the entire database. Syntax sp_spaceused [[ @objname = ] ' objname ' ] [ , [ @updateusage = ] ' updateusage ' ] Arguments [ @objname = ] ' objname ' Is the name of the table for which space usage information is requested. objname is nvarchar(776) , with a default of NULL. [ @updateusage = ] ' updateusage ' Indicates whether or not DBCC UPDATEUSAGE should be run within the database (when ...Show All
