DimitrybInTime's Q&A profile
SQL Server ADS: Sample application cannot access desktop database
The sample application provided with Access Database Synchronizer fires a "A request to send data to the computer running IIS has failed. For more information, see HRESULT." exception on my WinCE 4.2 device. I debugged it with VS2005 to see what was going on and found that the problem resides in the line: m_connDesktop.Pull("MSysObjects","SELECT Name FROM MSysObjects WHERE Type=1 and flags=0",accessSysConnectString,RDATrackOption.TrackingOff,"Err_MSysObjects"); It seems that connection m_connDesktop is ok but calling Pull method fails. I've verified that SSEvAccessSync service is started when ActiveSync detects device connection and that firewall rules are correctly updated. Also, i ve ...Show All
Visual Basic Image.FromStream(ms)----> error "Parameter is not valid." Help!!!!
Hello! I have an OLE Object in my table, that may be jpg, doc, xml file. In case of jpg I'd like to show it (VS2005 Visual basic). I did next (not full code): Dim ms AsNew MemoryStream() Dim reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SequentialAccess ) reader.Read() retval = reader.GetBytes(0, 0, outbyte, 0, bufferSize) ms.Write(outbyte, 0, retval) ms.Seek(0, SeekOrigin.Begin) curImage = Image.FromStream(ms )----> error "Parameter is not valid." I do not see the fault. Please help Hi ,you r getting error FromStream(ms) , previously i also got same Exception. I think when u converting string to byte and passing MemoryStream and after that FromStream, there ...Show All
Software Development for Windows Vista Packaging: "[Content_Types].xml" part?
I'm messing around with the packaging APIs (my eventual intent is to figure out how to add my own custom parts to an existing XPS file, since MS isn't telling). I started with the PackageRead sample, and made some adjustments to basically take a .XPS input and dump it to a flat-file structure. I'll know when I have it right when I can take any of the sample XPS files, dump to a folder tree, manually re-Zip that back to a .XPS and get a faithful reproduction. It's mostly working, except some sample XPS files have a [Content_Types].xml file in the package root. But for whatever reason, none of the Package collections (Parts & Relationships) seem to recognize the existence of this. So I have two questions: 1) Anybody know how to get at th ...Show All
Visual Basic USB driveletter
Hello everybody, The last two day's i'm trying to enum my USB devices and the drive letter. With WMI i'm able to get a hole lot of information about USB, but i can't make the link to the associated drive letter. Does anybody have a hint how to accomplisch this With regards, Jurgen You can enumerate drives and test them for removable, used this for finding an iPod drive and then tested for a known directory. Dim allDrives() As DriveInfo = DriveInfo.GetDrives() For Each d As DriveInfo In allDrives If d.IsReady = True And d.DriveType = DriveType.Removable Then ... end if Next There is a .GetType method available on DriveInfo but I have not explored it, you might see what its values are for t ...Show All
.NET Development Windows 2000 Unhandled Exception
I am running an app that connects to an SQL Express DB. I have a public connection variable Public mySqlConnection As System.Data.SqlClient.SqlConnection I then initialise it and connect to the DB like this: Dim DBName As String, DBPwd As String, sConnect As String DBName = "TimeBooking" DBPwd = "xxxx" sConnect = "Data Source=10.130.16.94\SQLExpress;Initial Catalog=TimeBooking;User Id=tb;Password=" & DBPwd & ";" mySqlConnection = New System.Data.SqlClient.SqlConnection(sConnect) This works fine on three machines all win XP Pro but reports an unhandled exception when run on Windows 2000. Two strange things are: 1. The exception SHOULD actually be handled as I have a Try ...Show All
.NET Development ArrayList missing .Item???
I know this has got to be in FAQ someplace but I can't find it, and it's driving me nuts... Every reference I find says that there's a .Item property for ArrayLists. But my .NET 2003 C# programs won't compile if I try to reference that property. For example: ArrayList MyList = new ArrayList(); Object o = MyList.Item[3]; I get a compile-time error: System.Collections.ArrayList does not contain a definition for "Item" Thanks for any help you can provide... In both .NET 2003 and .NET 2005 ".Item" will not be there in ArrayList. The code ArrayList MyList = new ArrayList(); Object o = MyList.Item[3]; will through compile-time error: y ...Show All
Visual Studio Express Editions clock time
what is the best to keep track of time What I want to do is calculate time worked in the morning and in the afternoon. For example: person clocked in at 7:55am clock out for lunch at 12:10pm clock in from lunch at 1:15pm clock out for that day at 5:22pm Is there an easy way to calculated this or I am basically going to have to do all the calculation in the code thanks You can use a method like this to do the work for you, all you need to do is supply it the punch times: public static TimeSpan TimeWorked( params DateTime [] punchTimes) {   ...Show All
Visual C++ VC6 vs VC8. Fight on!
Hello, I am a new comer to the world of all things VC8. I am having trouble finding a couple of bits - i wonder if someone more worldly could help Firstly, in the Class View window you use to be able to right click and 'Add Virtual Function/Add Windows Message' I can't seem to find this option in VC8 Secondly, you use to be able to have a toolbar section that let you 'display caller graph' and stuff like that. I cant seem to figure that out either... Any help or advise would be muncho apprecio! ...Show All
Visual Studio 2008 (Pre-release) Sometimes MediaElement plays streams without sound. Bug ?
I've been using MediaElement to play WMA audio streams. I use only one instance of MediaElement: <MediaElement Name="mediaElement" LoadedBehavior="Manual" Stretch="Uniform" HorizontalAlignment="Left" Width="83" Height="Auto"/> and I access this instance from code so that each time the user chooses a URL here's what I do: mediaElement.Stop(); mediaElement.Source = uri; mediaElement.Play(); Volume is always set at 0.5f and Mute is never set to true. About 1 out of 10 urls plays with no sound. I know it's playing because I not only received the play event but also see that the Position is increasing. This happens independently of the URL. However, I never have the problem ...Show All
Visual Studio Team System InvalidCastException in many rules on generic method
Many rules throw InvalidCastException when they meet a generic method with some generic interfaces around etc. Unable to cast object of type 'Microsoft.Cci.ClassParameter' to type 'Microsoft.Cci.Interface'. at Microsoft.Cci.StandardVisitor.VisitInterfaceReference(Interface Interface) at Microsoft.Cci.StandardVisitor.VisitInterfaceReferenceList(InterfaceList interfaceReferences) at Microsoft.Cci.Specializer.VisitTypeParameter(TypeNode typeParameter) at Microsoft.Cci.StandardVisitor.VisitTypeParameterList(TypeNodeList typeParameters) at Microsoft.Cci.Specializer.VisitMethod(Method method) … Test case: public abstract class Obj { } public interface ITypeFactory<TBase> where TBase : class { T CreateInstance<T>() wh ...Show All
Visual C# label.text repetition
Is there any shortcut instead of typing the code like this. I have 300 lines like these. Any suggestion guys, thanks label1.Text = myArray[0, 0].ToString(labelFormat); label2.Text = myArray[1, 0].ToString(labelFormat); label3.Text = myArray[2, 0].ToString(labelFormat); label4.Text = myArray[3, 0].ToString(labelFormat); label5.Text = myArray[4, 0].ToString(labelFormat); --- label6.Text = myArray[0, 1].ToString(labelFormat); label7.Text = myArray[1, 1].ToString(labelFormat); label8.Text = myArray[2, 1].ToString(labelFormat); label9.Text = myArray[3, 1].ToString(labelFormat); label10.Text = myArray[4, 1].ToString(labelFormat); .... until label300.text filled with the same array fo ...Show All
SQL Server LEAVES function causing problems in MDX Script
Hello, Got a bit of a weird situation here and I'm having trouble fathoming it. I have a cube with a dimension called [Currency]. I have a MDX Script which contains the function call: LEAVES([Currency]) And up until this afternoon everything was getting processed fine. Since then I introduced a new measure group that does not include [Currency] and still everything is getting processed fine. I then added another measure group that, again, does not include [Currency]. I am now getting a processing error on my second new measure group: Leaves function for attributes with mixed granularity in different measure groups is not supported. I think I can kinda work out why I'm getting the error - its because the LEAVES function ...Show All
.NET Development C#
Where is the documentation for all the objects and methods in C# provided by Microsoft. Is it available in hardcopy The objects and methods are .NET There is a eight volume hardcopy for .net version 1.1. I don't know about 2.0 http://www.amazon.com/Microsoft-Framework-Library-Reference-Volumes/dp/0735615551/sr=8-10/qid=1163268257/ref=pd_bbs_10/104-9790243-9636733 ie=UTF8&s=books ...Show All
Visual Studio reportviewer(visual studio) ina new window
Hi, I am using reportviewer in my VS2005 windows application. I have a listbox of report names and a Run button. User should select a report and click the Run button. How to open the report in a new window everytime and size it to fit the entire screen and not the application window Thanks, ...Show All
Visual C# is as Keyword
I have a general event handler function. and has a general object passed to it, but I have to use a "is" or "as" to decode the type, is it possible that the base class can detect the type and call the function for that type I don't what to use methodinvoke because it is so slowwwwww. Another apporach would be to anonymous delegates would help but I don't like putting several delegates in one method to handle each type.. and I would have to use continutions to continue the event pump... (ie see robots framework for an example) And I don't want to declare delegates for each type because this means more work for the programmer... void handler(baseobject ev){ if (ev is MyEvent) { MyEvent evmy= (MyEvent)ev); ...Show All
