blixt174963's Q&A profile
SQL Server CommandText on Report Server
When a report runs is it possible to retrieve the command text and modify it in order to append some additional "where" conditions, before the sql is processed to return data to the report You can write code like this declare sSQL varchar(500) declare sWhere varchar(200) set sSQL = "Select * from mytable" if lenght(@Parameter1) > 0 begin sWhere = " Where mycolume = '" + @Parameter2 + "'" end sSQL = sSQL + sWhere EXEC (sSQL) ...Show All
Visual Studio Express Editions how did u learn to program with C#?
well title says it all, with what, what was your first program or so maybe too :) cos atm i want to try and program things i totally cant, so im wondering how u learned C# just learn by reading books, examples, enjoyment - it takes time and patience, once you achieve that - thats all there is to it. Software development is not really an easy task - it takes time to progress and .NET helps you alot. It also helps if you have previous experience but if not, no worries - the forum is here, we are here to help, there are books as well as the huge MSDN resources and also code examples ...Show All
Visual C# Datagrid-columns
How do you assign a default value to a column on the Form_Load event. How do you get the selected value from a column with a combobox, and one with a tick box. Thanks ... Problem: how to set a column default value Solution: //Load the column default value DataGridViewTextBoxColumn Col16 = ( DataGridViewTextBoxColumn )dataGridView1.Columns[16]; Col16.DefaultCellStyle.NullValue = "1" ; thanks everyone ...Show All
Visual Studio Team System English words for data generation plan
Is there a way I can make the data generator for strings use English words instead of random characters Please try Regular Expresssion String generator. You can provide regular expresssions like: (206|425)-[1-9][0-9]{2,2}-[0-9]{4,4} (Pete|Tom|Mary|Larry|Lisa|Brain|David|Jeff|Amy) (Johnson|Smith|Good|Anderson|Baker|Crawford) [a-z]{5,8}@(hotmail\.com|msn\.com|[a-z]{3,8}\.(com|net|org)) Seattle|(New York)|Boston|Miami|Beijing|(Los Angles)|London|Paris DHL|FedEx|UPS AMEX|VISA|MASTER into Expresssion property of this generator to generate meaningful strings. Or, you can use the the default Regular Expresssion [a-zA-Z0-9]* to generate random strings that only have English characters. ...Show All
Architecture separating data access - Busines logic and UI
Hi friends, I have a question which I could not sort out. I checked the previous posts, I saw something relevant but not exactly what i need to know. I would like to create an Logical N-Tier application which will include DAL, BLL and UI . I decided to use TypedDataset created by visual studio dataset designer as the Data access layer , but my question would still remain even if I used custom entity classes . Now I am going to build a Business Logic layer to provide the comunication between UI and DAL . Lets assume that I have created the BLL and I use the following code in my UI. Me .DataGridView1.DataSource = mBLL.GetObject that works very w ...Show All
Visual C# best way to read pipe delimited text file?
I am trying to read in a pipe delimited file and do certain processing for each field. I was just wondering what the best way to strip out each field is - is there anything built in .Net that will easily allow me to do this Or do I just loop through and remove each field myself Also, would it be best to strip each field out into a dataset first, and then do the processing Or, do the processing while I am separating each field Or does it not matter Thanks! Saeed :-) yes you would! so you can create the columns on the fly once by looking at the number of items split into the array. Example: //while loop //split code here then..... if (theDataTa ...Show All
.NET Development sockets vb .net
Hi! i'm looking for winsock control in vb .NET, but i can't find it. I need an array of sockets.. Is there any way to work like VB6 (Drag & Drop, and calling .DataArrival, .Connect and the other methods and events) I'm newbie in this area.. Thanks! not quite, it differs. You have Socket, NetworkStream, TCPClient/TCPListener classes in .NET. http:/ / msdn2.microsoft.com/ en-us/ library/ system.net.sockets.networkstream.aspx http:/ / msdn2.microsoft.com/ en-us/ library/ system.net.sockets.tcpclient.aspx http:/ / msdn2.microsoft.com/ en-us/ library/ system.net.sockets.tcplistener.aspx http:/ / msdn2.microsoft.com/ en-us/ library/ system.net.sockets.socket.aspx ...Show All
SQL Server Management Studio and Enterprise Manager on Same Machine?
Greetings! Do any of you know whether or not it's possible to install Enterprise Manager onto a box with SQL Server 2005 installed I've come across a couple of problems when trying to admin some SQL 2000 servers, so I need EM somewhere. Also, it's incompatable with SQL Server 7.0, of course, and I've got two of them to admin as well. Thanks! DotNetFun wrote: Yes, it's OK, I've done it. But it's not recommended for a production machine. Uninstalling either may cause either to not function properly. Thanks for your reply. I went ahead and tried to install the SQL 2000 client tools on my laptop (which has the SQL 2005 installation). It was the only option I had. Anyway, it installed f ...Show All
Windows Forms Bound TextBox on form do not reflect changes made to TableAdapter
I have a form with a button with the following code. Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me .StudentsInfoTableAdapter1.UpdateQuery1(915, 5 ) Me .StudentsInfoTableAdapter1.Update( Me .BechinotFlatDataSet1.StudentsInfo) end sub The button does it's job: it runs the following query: "UPDATE StudentsInfo SET Paid = @gpaid WHERE (RecordID = @grecordid)" in the above click the @gpaid=915 and the @grecordid=5. Everything is fine, the table does update, but the textboxes on the form that are connected to the same StudentsInfoTableAdapter1 through a bindingsource do not show me the changes only if I close the program and t ...Show All
Software Development for Windows Vista Application are not sent WM_QUERYENDSESSION in Vista build 5308
My application does not seem to be sent WM_QUERYENDSESSION on Vista. I'm using build 5308. Is this message still supported in Vista I have heard of new ShutdownBlockReasonCreate and ShutdownBlockReasonDestroy. But they don't allow you to specify which operations to block. I would like to block logoff but not shutdown or restart. Thank you, John There's some information on this page: http://windowssdk.msdn.microsoft.com/en-us/library/ms700677.aspx ...Show All
Visual C# How Can I create Windows User Account by calling WMI method to do that ??
Hi How Can I create Windows User Account by calling WMI method to do that I know that I can create windows user account by using [System.DirectoryEntry] Class as this artical in microsoft support website http://support.microsoft.com/default.aspx scid=kb;en-us;306273 but my question is to create the Windows user Account using WMI methods , How Can I do that and thanks with my best regarding Fraas Sorry for the late reply. I found some code in WMI to create user accounts, I am going to convert it to C# hopefully however unfortunately my main system went down last night ,in the process of restoring it now. Please bare with me ...Show All
SQL Server NET_ADDRESS in the master.dbo.sysprocesses table
Does anyone knows how the field NET_ADDRESS in the master.dbo.sysprocesses table is encoded May I extract the IP address or MAC address from that field I had the same thought as you but my sql server reports strange values for some PC: B7D36284FF31 MICHELENEW CBB6ACE3C807 CARLOP are clearly strange values, CBB6ACE3C807 is My PC and my MAC is 00-0E-A6-1D-BE-29 do you have any idea about here the complete report from master.dbo.sysprocesses table NET_ADDRESS HOSTNAME ------------ ------------- 00096B67790E SERVER2003 000EA61DBBCE NICOLA 000EA61DBD4D EMANUELEXP 000EA61DBEFF MICHELENEW 000EA61DC006 ENRICO02 000EA6C49C83 BAMBINO999 000EA6C71205 DOMEXP 000EA6D0B069 MICHELA2 000FEA8184 ...Show All
Visual Studio Team System Check-in policy errors / suggestions / questions
I am trying to play with check-in policies. I installed it, then added it to the project. Everything seems to be OK. Now I delete my DLL from desired location. I have two Team Projects visible in Team Explorer and now every time I am trying to check Source Control checkin policies it throws a error that policy is missing and provides installation instructions - but it's doing it twice! I guess it'll throw addiotional exception for every added team Project... That seems like a bug to me. Now suggestion - those isntallation errors are shown when I am trying to access checkin policy setting on a source control - that's nice but wouldn't it make more sense to show installation instructions when somebody tries to check in and doesn't have poli ...Show All
Visual Studio Object Test Bench: Invoke method that expects string[]
From Class View, is it possible to invoke a static method that expects a string[] parameter I tried to, but I can't figure out the correct syntax to pass the parameter in. {"a", "b"} does not work, I get: "Type Mismatch: 'System.String[]' expected". First you have to create String[] object. You can create this by using "Immediate Window". Immediate Window can be viewed by clicking on Debug --> Windows --> Immediate of Visual Studio 2005 menu bar. In the Immediate Window, create String[] object by typing String[] args = {"abc", "xyz"}; // or any valid syntax to create String[] object This will place args object in Object Test Bench. Now invoke your static met ...Show All
Visual Studio Framework 1.1/2.0 install- uninstall
Hi I am attempting to install framework 2.0 and its SDK. I didnt uninstall framework 1.1 with its SDK. After I realizied what I did i decided to uninstall both versions 1.1 and 2.0 along with their SDK's. After doing so I found the SDK v1.1 still in my programs in the start menu but it doesnt show up in the add/remove panel in the control panel. How do I fix what is messed up It may have just been uninstalled but forgotton to remove the start menu items, which rarely happens. Perhaps you installed something else also Could I also ask why did you need to uninstall both versions of the framework Is there something that was causing some problems We can sort it out for you if you like and supply us ...Show All
