Gilles Gilles's Q&A profile
Visual Basic Using FileGet to read Array in Structure (VB.NET Express Beta2)
I encounter a problem when using FileGet to read structure that includes an array. The code is: Public Structure Test Dim a() As Integer Public Sub ini() ReDim a(3) End Sub End Structure The following code use FileGet Dim i As Integer Dim te As New Test te.ini() FileGet(1, te, 1) i = te.a(0) The error message is: System.IndexOutOfRangeException was unhandled "Index was outside the bounds of the array." Does anyone know why Thanks. Jo FileGet does treat arrays and arrays in structures differently - try defining your structure as: Publ ...Show All
Windows Live Developer Forums Issue with window.external.Channel.SendFile() Method ... Need help Please
Hello everyone: I have my SendFile tag set to true in my xml. I can successfully get the file i want to send by using the var fso = new ActiveXObject(" Scripting.FileSystemObject") then calling the getfile(path to file) method. But, when i try to send this using the code that Microsoft provided in the MSN Messenger Activity API help file as well as microsofts site; I keep getting this error every time I run my activity. "SendFile failed. Error Description: Invalid procedure call or argument" Below is the code segment that is issuing. Please if you have any info that can help me that would be gre ...Show All
Visual C# How to know the generic value is nullable value or not
I cannot do it. How can I do public class Test<T> { public Test() { } public bool IsNullable() { if (T == typeof(Nullable<T> return true; else return false; } } Gary, Unfortunately that won't work. T could be a reference type and therefore can't ...Show All
Microsoft ISV Community Center Forums Find & Replace Macro - Reading from an external database..
I have some code that will do a find and replace looking for a keycode in a database and replacing it with a corresponding value. Let's say I write a lesson plan (I'm a teacher) - and I want to write something in from the Natiomal Curriculum (a weighty tome) - it's too much to write in the full statement each time. I write ks21c the macro opens the db, looks for ks21c and replaces with Key Stage 2 1c) To be able to use a testtube etc..... Only problem is - the code is in Star Basic from the OpenOffice 2.0 suite - can anyone convert it for Word The code follows........ Sub ReplaceABC dim aFind as variant dim aR ...Show All
Windows Forms Linked Scrolling of 2 TextBoxes
I have 2 TextBoxes with content of the same height. How do you link the scrolling so that scrolling one also scrolls the other Best example use of this would the diff comparison feature of SourceSafe. By catching the scroll event, having the same code for both, and working out which one was scrolled, and setting the scrolling on the other. ...Show All
SQL Server SOAP API
Is there any API available for getting assigned role information For eg: A user xyz has a browser role and other user zzz has a content manager role. Now, I should be able to pass the user credentials and get back the assigned roles. Thanks, No, such an API does not exist. The reason is that the "roles" that a user is assigned to depends on the item in which they are acting on. A given user might have "Content Manager" role on one item in the catalog, but not have any role on some other item in the catalog. In order to determine the roles in which different user groups are in for a particular item in the ca ...Show All
Visual C# Why all these get/set-methods instead of public variables?
I've started to use classes to structure up my programs and all tutorials i've read says that i should do like this: class Spelare { float positionX; public Spelare() { positionX = 100f; } public float PosX { get { return positionX; } set { &nb ...Show All
Visual Basic PreparedStatement in VB6
Is there a PreparedStatement in VB6 similar to Java Hi Shilpa, Yes there is. You will need to set the Command.Prepared property on the ADODB.Command object to True to achieve this. The Command.Prepared = True statement takes the CommandText and pre-compiles it, so it's actually a little slower than a direct SQL statement the first time that it runs, but every time after that, it will be faster. Regards, Vikram ...Show All
Visual Studio Express Editions Slow screen redraw
I am in inexperienced programmer who has an application that displays many (50-60) controls on a form. The application is a production planning system, that requires many controls displayed on screen (1 for each job qued on individual machines) Whenever the form is re-draw, it is painfully slow, I have set the doublebuffer ControlStyles etc, but are unable to fix the issue. This issue is running on a P4 2.8GHZ / 500MB PC. Can anyone assist I have attached an example of my problem (not my actual application, but the samle gives the same issue). The sample simply displays many controls onto a form. When you force a redraw ie ALT ...Show All
.NET Development Quick SQL question
I am trying to build manually the UPDATE, INSERT and DELETE strings of my OdbcDataAdapter because the ones generated by the OdbcCommandBuilder are not going to be adequate. I will still be starting from the generated strings and build on them. To understand better what they do, I need to interpret a specific SQL predicate, and I am having trouble with an expression within. The following SQL command is supposed to ensure that a row in a table is deleted only if the data hasn't been changed (in OBDC style, parameters are designated by question marks): DELETE FROM MyTable WHERE ( (ColumnIndex = ) AND ( ( =1 AND TextColumn IS NULL) OR (TextColum ...Show All
SQL Server error (rsAccessDenied) - 'NT AUTHORITY\NETWORK SERVICE' are insufficient
I have created a report using Microsoft Sql Server 2005 Reporting in my ASP.NET 2.0 Web application. It is succesfully running on the server itself on which I have created. But when I am trying to access it from my client machine by typing URL in the IE6 it gives me following error. "The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation. (rsAccessDenied) " Dont know how to solve this problem. Hi You should go to the reports manager ( http://servername/reports ) And go to the property tab and create a new group with name BUILTIN \Users And in the role assig ...Show All
Windows Forms How can I check for Null dataset
I wanted to check for an empty dataset which is being returned from a datagrid. How can I do that Dim myDataSet As DataSet ' this code returns the dataset of datagrid dgmonth. myDataSet = CType(dgmonth.DataSource, DataSet) so I wanted to write if myDataSet = nothing then exit sub end if but this if..then loop gives an error. I will appreciate ...Show All
Visual C++ Dump files and obtaining stack information
Hi All, Im trying to read a mini dump file using MiniDumpReadDumpStream, which successfully works, and want to know how to obtain stack information that is contained within this file. Ive found StackWalk64, which requires a handle to a process and thread to be passed in - how can this be obtained from the dump file If anyone has any examples - it would much be appreciated. Thanks AFAIK this is not possible. You can use VS or WinDbg to load the minidump file. It may be easier for you to create the stack trace as a seperate operation when you create the minidump. This is the way I do it. Al ...Show All
Architecture Advantages of OOP ?
Hello, Im a fun of OOP designs. I design my bussiness classes when I start a new project. Then maybe I will write mapper classes for bussiness classes to map DB tables or using an O/RM tool or an ODBMS . Think that this project is big one and it has long deadline. You will develop it 2 or 3 years. Requirements will be changed. To develop this project with OOP designs and n-Tier application design is good idea. But I am asking myself this question "Why am I choosing this long way ". I think the advantages of OOP are re-usable and flexible (when there is a new requirement). OOP makes less code behind user-interface. But I dont un ...Show All
Visual FoxPro report preview form problem
I posted a post related to some problem with memo fields in reports. What I've done so far was to create an intermediate table, a workbench with a single field of a character string length 95. When I need to preview or print a memo field I first format it and place every word sequentially in records of that table. It required a bit of coding but now it seems to work. In any event, the problem I am about to inquire is not related to it at all. It was just an introduction to show that I do have a preview form filled with some meaningful stuff to the limit. Here is the weird part: once I get this preview form with the report on it it cannot ...Show All
