Paulnz's Q&A profile
Visual Basic Error with using ReportParameter
I have the following code, Dim params(0) As ReportParameter params(0) = New ReportParameter("rptHeaderLabel", "Test") Me.ReportViewer1.LocalReport.SetParameters(params) Me.ReportViewer1.RefreshReport() similar to the code used in http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=210552&SiteID=1 but unlike the other programmers, I am getting the following error; 'Microsoft.ReportingServices.ReportRendering.ReportParameter.Private Sub New(param As Microsoft.ReportingServices.ReportProcessing.ParameterInfo)' is not accessible in this context because it is 'Private' Any suggestions I what I am missing Hi, ' It's not this ...Show All
Visual Studio Express Editions Import data (csv or Excell Spreadsheet) to existing table
I need to import data from another source database. I don't have access to that database only a csv or spreadshhet that the database provides. I have data already in the table and need to append the imported data to it. Using either a csv file or a excel spreadsheet, Can somone please explain how i import data into an existing table in vb2005 express. Actually, problem was all my own. I was working with a test csv file that contained an operator '-' in the file name. Changed that, worked like a charm. Ted ...Show All
SQL Server Can't launch executable from SQL Server Agent Job
I'm trying to launch an .exe from SQL Server Agent Job and basically nothing happens. I created a job, with 1 step, type is Operating System (CmdExec), run as sql agent service account, and in the command box I typed "start notepad" (no quotes). The job owner is set to administrator. I manually start the job, it processes successfully yet notepad does not launch. I've tried with other .exe's and result is the same. Any advice Thanks! maybe what you need to type is notepad.exe alone anyway you can also place a jobstep containing exec xp_cmdshell 'notepad.exe' for more details on xp_cmdshell please consult BOL or see this link http://msdn.microsoft.com/library/default.asp url=/ ...Show All
Visual Studio Express Editions nested subs
Is it possible to nest subs in VB ...How By default it's giving an error... Thanks Presumably, you want to encapsulate functionality. What you can have is nested classes: this allows you to wrapper your complete function in a single class, and have sub-classes that perform specific functions. These sub-classes would not be visible outside the main, wrapper, class. Public Class MyFunction Private Class SubFunction ' This class is completely encapsulated ' in the MyFunction class, and is not visible Public Shared Function MultiplyNumbers( ByVal x As Integer , ByVal y As Integer ) As Integer Return x * y End Function ...Show All
Visual Studio Express Editions USB Device
My Question: My PC contains 4 USB devices, I have 2 USB ports being used, one for a keyboard, and the other for a USB modem device. What I would like to do: 1. Make sure that USB modem device is connected to the assigned USB port say Port 1. 2. Make sure that Keyboard is connected to the assigned USB port say Port 2. 3. If the devices are swapped, the user should not be prompted to install the device driver for the modem onto the USB Port 2 and it should not install the drivers on to this port. 4. If the USB modem is plugged into any port other than USB Port 1, then the system should not detect or begin the installation of the modem drivers on any of the other ports. I have read much about WM_DEVICECHANGE. How do I use this in VB not VB.NE ...Show All
SQL Server Installing SQL Reporting Service 2005
Is it possible to install SQL reporting service 2005 using a Microsoft SQL Server 2000 Enterprise Edition License What should be the version of SQL Server to install SQL Reporting Service 2005 OR Which all versions of SQL Server supports SQL Reporting Service 2005 Thanks in Advance. Regards, Richy This topic in books online explains which editions of SQL Server you can use to host the report server database. http://msdn2.microsoft.com/en-us/library/ms157285.aspx -Lukasz ...Show All
SQL Server How to check null or '' in date field in expression and ...............
I have a column say 'ActivationDate' which is a (database timestamp [DT_DBTIMESTAMP]) which I want to replace with an expression in derived columns The condition is if 'ActivationDate' field is null or '' then 'Null' else 'ActivationDate' I am struggling to write this condition. Without condition i.e. at present it saves the value in this database '1753-01-01 00:00:00.000'. In the preview the 'ActivationDate'field does not show any thing so I recon it is either null or '' Thanks guys. Still I have got same problem. My [ACTIVATION DATE] field has got nothing in it (confirmed in the preview of the columns). This is what I have in expression now ISNULL([ACTIVATION DATE]) NULL(DT_DBTIMEST ...Show All
Visual Studio Express Editions Setting focus on external applications and Sending keys to them!!
Hello, Im am making a program that has to set focus on two external applications. So far that is not the problem, i am able to get focus to them using, FindWindow and BringWindowToTop. This gives me the applications focus. Now my problem, i have to send a command to the first application (ctrl+F1) then a popup appears, i then have to do(enter), switch to the second application then send the key (F2). The only procedure i found to do this was SendKeys, but unfortunatuly it only works half the time. Most of the time, all the keys are sent to the second application. (and that even when i do the first sendkeys before i put the second app in focus.) From what i have read, SendKeys is realy not a safe way to do this, but i cant seem to fin ...Show All
Windows Forms exception when opening complex C# form in design mode
Suddenly one of our complex forms started to refuse to be opened in design mode :) it throws an exception: Method 'System.CodeDom.CodePropertyReferenceExpression.AddRange' not found. at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement) do you have any idea what cou ...Show All
.NET Development I am using VS 2005 to do my project. But the Microsoft visual Basic Compile pop-up window is so annoy. I have no idea why it k
I am using VS 2005 to do my project. But the Microsoft visual Basic Compile pop-up window is so annoy. I have no idea why it kept showing up. The terrible thing is that once it shows-up and when I click "Don't Send" button, it just keep come back until I click "Don't Send" for dozen of times. This is really annoy. Anyone has suggestion to turn this thing off Thanks gao Hi, Can you compile one by one, from the individual to the general one Maybe you can detect the project that is causin the issue. Or you mean that the message appears event when you are not compiling Cheers ...Show All
Visual C# About returning @@Identity
I have written the following typical code for updating a datatable: private static bool UpdateExtraInfo(int intItemID, DataTable dtExtraInfo, SqlTransaction myTransaction) { // Create a SqlDataAdapter, and dispose of it after we are done SqlDataAdapter dataAdapter = new SqlDataAdapter(); try { &nbs ...Show All
Visual Studio Team System CTP5 - SQLExpress Schema Import and Compare permissions issues
Great job guys! This tool has some excellent potential. I get a permissions error when importing or comparing a schema with my local SQLExpress database. For example comparing yields a message box with the following error: Cannot open database "c:\....." requested by login. The login failed. Login failed for user 'myusername'. This error confuses me for the following reasons: a) I own the database file and get the error even if sqlexpress is running as me. b) The database connection being used by schema compare works just fine when I use the "Test Connection" button. Does this have something to do with the fact that I am connecting to SQLExpress Hi I am try ...Show All
Visual Basic Scroll bar controls
I know this is only basic("Scuse the pun") stuff for most of you, but i'm doing all this for the first time. I am trying to use the control for a Male/Female option, I got the scroll properties sorted to how I want them, but having problems with the code to accept a boolean option. (If one side of the control then male if not then female) Any help or advice would be welcome. Thanks Assume you got a scrollbar named "ScrollBar1". You can write this to get a boolean for the condition you descripted: Dim Male As Boolean Male = ScrollBar1.Value = 0 Looks strange. Buts its right. First, the comparison of the scrollbar value with 0, if it is the case the return value is tr ...Show All
Visual C++ ListView component, Managed C++and a some kind of datasource?
Hi, I am working on a Windows Application (in Visual Studio 2005 using Managed C++) and I have a ListView component that should display data in 5 columns and an unknown number of rows. Another class in my application will based on some variables calculate data and store them in some sort of DataSet or Array. I would like to bind whatever solution I use to the ListView without having to access each item. Just something like: myListView->DataSource.Bind(DataSet | Array); What variable would be appropriate to use in this case Any suggestions Grateful for answers /M Hi, I think you could use "DataBindings" member like this: ListView1->DataBindings->Add( gcnew Binding( & ...Show All
Visual Studio 2008 (Pre-release) How are InvokeRequired/Invoke supported in WPF?
Are they I need to port this to WPF, but InvokeRequired has been removed from the control and there is no form :(( public static void AppendText( Form form, TextBox textbox, string text) { if (textbox.InvokeRequired) { AppendTextCallBack CallBackAppendText = new AppendTextCallBack (AppendText); form.Invoke(CallBackAppendText, new object [] {form, textbox, text }); } else { textbox.AppendText(text); } } Nick Kramer has devoted several pages of word document on WPF threading , you should check it out, its just so great. Sheva ...Show All
