GrandpaB's Q&A profile
Visual C# retrieving the type of a generic Type argument
Hello, I have a question considering generics.If we take the next code snippet: public abstract class TypedResourceRetriever<T>{ public Type ResourceType{ get { return T; } } } This code does not work. I wonder why microsoft did not make this work. It would be really handy for me to have this feature in the C# language. I solved the problem with the code below: public abstract class TypedResourceRetriever<T>{ public Type ResourceType{ get { Type t = this.GetType(); while (! t.Name.StartsWith("TypedResourceRetriever")){ t = t.BaseType; } return t.GetGenericArguments()[0]; } } } Obviously this is not the way to do it. (if someone o ...Show All
Microsoft ISV Community Center Forums Access 2002 Error 2455 - invalid reference to the property Form/Report
How can I refer to ControlSource property of textbox control of a subreport The reference below ended with the error 2455 - invalid reference to the property Form/Report. It was written in Report_Open event of the main report. or, cannt we refer to the control in a subreport Reports![report_name]![subreport_name].Report![textbox control_name].ControlSource Original object was to set ControlSource of a textbox in a subreport at runtime . When I tried to set ControlSource in Report_Open event procesure of sub report, I received "2191" error - you cannot set the control source property in print preview or after printing has started. Where and when could I set this property Yuko I'll ...Show All
Visual Studio Express Editions SQL querry between two dates
Hi, I need some help with this please. I have a database table which contains customer orders. I am trying to code my SQL select statement to: 1) Only return records where the record orderdate is within the last 30 days 2) Between two dates, selected from the datepicker control. With regards to issue 1, I could fill a table with all the records for the account in question and then for each record do a datediff between the records order date and the current date to determine if the number of days is within 30 days. If yes then add this record to a temp table and then set this table as the datasource for the datagridview. There must be a more efficient way With regards to issue 2) ...Show All
Microsoft ISV Community Center Forums uploading Data from excel to a InSQL Server
I need to set up an automatic (macros) button so that data on my excell spreadsheet is uploaded to a remote InSQL server. This data has to be saved as CSV format. I have been able to work out the CSV saving issue but not to sure how i direct it to save to the server... very new to using VB so any help would be much appreciated.. Please note at the current moment im not connected to the server. So i wont know any details about the server.. ...Show All
Internet Explorer Development Vist or IE7 and Cookies
I have an application that uses the webbrowser component and when launched goes to a website. Previously I’ve navigated to the web site and set the cookie to remember who I am so I no longer have to log in. However, in my application I am still required to log in. This app worked fine under XP, but not doesn’t appear to work under Vista. Is this due to IE 7 Vista Security issue in both Any help would be appreciated, by me and my wife as I keep kicking her off her machine to run this app :) Thanks Wayne This is most likely a security change caused by Vista Protected Mode. Cookies are not shared between Protected Mode IE and medium integrity applications on the machine. To verify, try putting your login si ...Show All
Visual Basic Math Integration/Derivation function?
Hi, does VB.NET include the Mathematical Integration/Derivation functions in the Library If so where are they, I couldn't find them If not, any third-party libraries you would recommend Thanks in advance. The system.Math class p rovides constants and static methods for trigonometric, logarithmic, and other common mathematical functions. To get the integration and derivation functionallity you will have to program that yourself or get readymade 3rd party classes: http://www.extremeoptimization.com/QuickStart/AdvancedIntegrationVB.aspx http://sharptoolbox.com/categories/math-logic-ai-rules Or google for the thousands of others out there...you may wish to search codeproject http://www. ...Show All
Windows Forms Storing secure data
I'm wondering if there's a standard way of storing sensitive data to be used by a winforms application. I'm thinking of something like iTunes that holds onto your password to connect with the online store. What would be the best way to store that password on the user's machine so that it couldn't be compromised Thanks. This is the link to the companion source code of the book. http://www.microsoft.com/mspress/books/companion/6436.asp#Companion%20Content Chapter 18 deals with security. I think 18.13 is about "Salting," and Ch18.16 is the "full-proof" encryption of password. ...Show All
Visual FoxPro dsn-less connection
I'm using VFP9 SP1. I have tables (dbf) which are contained in a database container (e.g. test.dbc). Now, I want to create another database which will contain remote views to those tables. I will use dsn-less connection. What is the difference between a connect string to visual foxpro tables and a connect string to visual foxpro database DSN=Visual FoxPro Tables;UID=;PWD=;SourceDB=c:;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes; DSN=Visual FoxPro Database;UID=;PWD=;SourceDB=c:\test.dbc;SourceType=DBC;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes; Thanks, Peter Hi Cetin, I'm using remote view because I want to get a connec ...Show All
Visual Basic How to build a VB program that run in other PC?
Hi, I am using VS 2005 to write a VB program. Now I would like to make it as a .exe file that can be executed in any PC (with windows OS). What i have done in that, I build the VB program in VS2005, and i found there is a folder called "Release" is created during the building process. In that folder, there are 3 files with extension ".exe", "pdb", and ".xml". I have been tried to copy all these files to another PC with Win XP OS and run the .exe file, it failed to execute and an error signal pop up.... ! ....oh yes!, by the way, I have tried the .exe file in the PC where i created it, it works.....can someone help me! Thank you!! You need to hav ...Show All
Visual Basic for loop issues with concatenating variable with text box
I have 10 text boxes textbox1, textbox2 ...etc I want to modify them with a loop this code does not work Dim w as int For w = 1 To 10 Me.TextBox & w = someStringArray(w - 1) Next w it does noe like the &, I tried + and () and [] and nothing works. Any suggestions thank you. DMan1 wrote: DOes your textbox array already exist Is this VB6 or .NET In .Net you will have to create your own "control" collection/array/list to manage a group of controls! Hi, The array already exists and its a VB6 project. TIA ...Show All
Windows Forms Datagrid Refresh
Hi, I have a windows forms, that has the following problem, I show a query from a database in a datagrid, this datagrid has an event when the user click on it I get the row data to fill the form, in the from I have a search procedure (txtbox with textchanged event) that will query again the results with the data provided by the user, the problem is if a row is selected in the datagrid, when I send the new datasource, the old registry keeps there over the new one. How can I remove that I've already tried to rebuild the object, to refresh the screen but no success. Thanks Here is the code that I'm using When the user clic on a cell private void grdAddress_CurrentCellChanged( object sender, System.EventArgs e) ...Show All
Visual C++ How can i make my editing auto completed?
I use vs2005 to write cpp code A class is defined in a .h file, and I refer to this class in a cpp file including the .h. when I type "->" following a pointer of that class, no hint is showed about the members How can I make it work, thanks Thank you very much Reloading the project is really helpful, but is there some way in which I can update ncb file without restart vs2005 But suppose class A is defined in "a.h", and it is declared in "b.h". If both "a.h" and "b.h" are included, sometimes the autocompleter will resolve a pointer of A as the declaration in "b.h", and no member of it will be auto completed. ...Show All
Visual Basic Illeagal Characters In Path Error.
Hi, I have this error, Illeagal characters In path. I figured out it happend when the FILE NAME had spaces in it, so It took me one week to make it change the spaces to "_". In the debug I didn't have the problem any more. Now I installed the program, and it happend. I don't know the exact line, but if it's because of space it's in the Folder's name. SPACE ISN'T AN ILLEAGAL CHARACTER! Why does it happen Is it a bug in VS How can I fix it Thanks. Tell me if I understanded the Error Message correct: "System.IO.File.ReadAllText(String path, Encoding encoding)" - It's about a My.Computer.FileSystem.ReadAllText Function. "at AUM.Form1.ProfileChoose_SelectedIndexChang ...Show All
SQL Server reading pdf files with SSIS 2005
hello to everyone, i would like to ask u if you know how can i import pdf files in sql server integration services 2005 does anyone have a script thank u Wrting PDF files with SSIS 2005 may have been a better subject line. How about reporting services, it is there in the box at no extra cost, and can produce PDF files. PDFs after all are presentation layer, so SSIS isn't really the ideal place for that. ...Show All
Visual Studio Another VS 2005 setup failure
Like a lot of people, i'm having trouble getting this to install. I didn't have any previous versions of this software on my computer before attempting to install this. I have repaired the framework, manually installed document explorer.. I'm the admin with no AV running.. the setup fails when trying to install the "Microsoft Visual Studio 2005" an error box comes up "cannot read from the specified device" - clicking retry just brings the message up again. This software is needed for a class - it is on 2 cd's any help error log: [01/26/07,14:36:41] Microsoft Visual Studio 2005 Professional Edition - ENU: [2] ERROR:The system cannot read from the specified device. [01/26/07,14:36:43] setup.exe: [2] ISetupComponent::Pre ...Show All
