maddinthegreat's Q&A profile
SQL Server Update of text collumn
In a batch job , I use the following (pseudo)sql for updating of a col text column - basically a search of char1 and replace it with char2 - ---------------------- declare @i as int select @i = count(*) from <table> where <col> like '%char1%' WHILE (@i > 0) BEGIN DECLARE @textptr BINARY(16), @patIndex INT, @patLength INT , @str varchar(10) SET @patLength = DATALENGTH('char1') set @str = char2 textUpdateLoop: SELECT TOP 1 @textptr = TEXTPTR(<col>, @patIndex = PATINDEX('%char1%', <col> - 1 FROM <table> WHERE PATINDEX('%char1%', <col>) <> 0 IF @@ROWCOUNT = 0 GOTO endLoop UPDATETEXT <table&g ...Show All
Visual Studio Express Editions Tab Control on a form view-tabs not visible!!
Hi, I would like to place a tab control on a form view based application.I have placed the tab control but the tabs are not visible,how to proceed I would then like to place certain controls on each tab. Please help!! This is a very common problem for beginners starting out - a tab control on its own does not have any tabs. You actually have to add the tabs using a function call. Not sure what you're using (is it non-.NET or is it a .NET app) ...Show All
Visual Basic Can I use Tutorial Video for VB 2005 Express Ed. with Vis. Stu. 2005 ??
Hi, Ive found some beginners videos for VB but require Visual Basic 2005 Express Edition... I have VB 6 and Visual Studio 2005 , Can I use VS 2005 for the projects. thanks MSDN offers a free book called "Introducing Visual Basic 2005 for Developers" that you can get from http://msdn.microsoft.com/vbrun/staythepath/additionalresources/IntroTo2005/default.aspx ...Show All
.NET Development How to get a DataSet from DataGrid ????
How we can get a Dataset from the DataGrid I even tried DataSet ds = DataGrid.DataSource(). But no result..... Sample Code as follows Private Sub Page_Load( ByVal sender As System. Object , ByVal e As System.EventArgs) Handles MyBase .Load If Not Page.IsPostBack Then Dim cn As New SqlConnection("....................................") Dim da As New SqlDataAdapter(" select * from Customers", cn) Dim dsA As New DataSet da.Fill(dsA) DataGrid1.DataSource = dsA DataGrid1.DataBind() End If End Sub Private Sub Button1_Click( ByVal sender As System. Obje ...Show All
Windows Forms setting a listbox's DataSource property, and THEN setting DisplayMember causes SelectedIndexChanged event to be fired twice
just noticed this after a lot of struggle - my database was being loaded twice and i couldnt figure out why narrowed it down to this - when you set the DataSource property, the event SelectedIndexChanged gets fired. If you then set the DisplayMember property, when there's already data in the listbox, it gets fired again. However if you set the Display ...Show All
SQL Server problem with ICommandText, a single ' becomes double
in my case, i use GetCommandText to get the default command text, then add a 'where' clause, like follow. TCHAR buff1[100]; TCHAR buff2[500];// what is the max length of a string is ther any MAX macro pCommandText->GetCommandText( &guid, buff ); _tcscat_s( buff2, L" where id='" ); // i add a single ' just after '=' _tcscat_s( buff2, buff1 ); //initial before and trimed, no ' in it _tcscat_s( buff2, "'" );//use a ' to close the string in sql mydb.Open();// it returns S_OK...but !!! i traced the command executed in sql server2000, and the actual command it excuted was: select * from mydb where id=''01'' one ' become two ...Show All
Visual Studio Team System Suggestion for Extraction/Validation
I am creating a webtest that has a lot of extraction and validations rule. It would be nice if in the tree view instead of an extraction rule reading "extract text" it read something like "extract text (name of the rule)" So if I had a extraction rule to extract PO_ID it would read "extract text (PO_ID)" It would be nice if there was something similar for validation rules. ...Show All
.NET Development Remoting Events Sample
Hello, I have a sample project that uses remoting and events to inform clients of data changes. It works with the .NET Framework 1.1 but not with 2.0. Can someone please help I wasn't able to post the zip with the project, I can send it to you. Thanks. Reese Everyone. Sorry I didn't reply sooner, I finally got the sample to work. I had found one that was written in VB that was exactly the same, except it worked. I compared the code and finally got the c# version to work. The issue was that one of the code files got overwritten during the unzip that shouldn't have. Thanks for all your help!! PS -- here is a link to the VB ...Show All
Visual C++ Strange error with _fileno
We're in the process of converting from visual studio 98 to 2005 (yes, we were a bit behind the times). Most of the changes are now dealt with, but there's one weird one that we can't figure out - it looks like a bug in the compiler. Here's the error we get: v:\frame\utils\.\preftext.c(104) : warning C4996: '_fileno' was declared deprecated C:\MSDev05\VC\include\stdio.h(219) : see declaration of '_fileno' Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _fileno. See online help for details.' v:\frame\utils\.\preftext.c(469) : warning C4996: '_fileno' was declared deprecated C:\MSDev ...Show All
Visual Basic Cross Thread Headache
I am having a cross thread headache with my control I have created. I have a control on a form (frmUtils) when an event is raised by this control I want to update a listbox on my main form (frmMain) to show this data. I have read a lot of posts about this problem but nothing seems to give me an elegant solution. Setting CheckForIllegalCrossTheadCalls=False, causes other code sections to stop working properly. It is very frustrating when something that was so simple in VB6 is suddenly more than a days work in 2005 Does anyone have an comments / thoughts Thanks Private Sub control_Event( ByVal sender ...Show All
Visual Studio Team System TF30068: An exception has occurred in a TF component: Could not load 'microsoft.visualstudio.coverage.analysis'
Hi, i've just installed TFS beta 3 + TFS Client using TFSSETUP account :), after logof and login with my admin account i'm getting this errors in MS Error Reporting: Application: VSTF Coverage Analysis Error Description: TF30068: An exception has occurred in a TF component: Could not load file or assembly 'Microsoft.VisualVtudio.Coverage.Analysis, version=8.0.0.0, Culture=neutral, PublicKeyToken=some numbers' or one of its dependencies. The system cannot find and the second Application: CoverAn.exe Error Description: Application Error What is it TIA I'm having similar issue while installing T ...Show All
Visual Studio Express Editions About VB.NET VB Express Edn.
Hello, I recenty came thru abt Visual Studio Express Edition. I have a question that is it the Visual Studio.NET or It is Updated version of Old Visual Studio 6 Another Question : If I build an app. in VB.NET 2001 Proff. Edn. Then is it compatible for Visual Studio Express Edition Thanks in Advance. The Visual Basic Express Edition is the base edition of Visual Basic 2005 (aka VB 8.0). Applications created in Visual Studio .NET 2002 or 2003 are compatible with the Express Edition provided they don't rely on features that the Express Edition doesn't support, for example, connecting to a remote database. H ...Show All
Visual C# Updating an SQL database
Got a little problem... I have a simple windows form with one button and two textfields taken from a database. When i press the button, I want to save the information in the textfields in the table where the textfields are attributes. This is my code: private void btnSave_Click(object sender, EventArgs e) { String kode = entKodeTextBox.Text; String navn = navnTextBox.Text; SqlConnection testConnection = new SqlConnection( @"Database=northwind"); SqlDataAdapter testAdapter = new SqlDataAdapter( "SELECT EntKode, Navn from TestSimen", testConnection); SqlCommandBuilder testBu ...Show All
Windows Forms Embedded user control in Internet Explorer - cannot connect JavaScript handler to an event of the control
Hello, I'm currently working on a windows forms user control embedded in a web page. The user control is implemented on .NET Framework 1.1 with Service Pack 1. The control performs a long operation in the background and at the end it needs to notify the host (the web page viewed in Internet Explorer) that the operation completed. I followed every single guideline discussed on Microsoft websites but I've been unable to connect the event handler (written in javascript and embedded in the web page) to the event. No matter what I do, there is no delegate attached to the event. I implemented my control in a similar manner to the one pre ...Show All
Visual Basic Providing application help
I want to provide standard help for a complex application with, possibly a treeview structure and index facilities. How do I do this as simply as possible using VB2005 If you would like to do things VERY simple then you can write the help in PDF form and just call the file in the program. Didn't have much luck writing a real help file so this is all I can provide. On the otherhand, PDF help files are more visual and sometimes easier to understand... Dim OpenList As New Process OpenList.StartInfo.FileName = "C:\Help.pdf" OpenList.StartInfo.UseShellExecute = True OpenList.Start() ...Show All
