wingsalltheway19's Q&A profile
SQL Server Understanding ADO
Hello, I want to use OLE DB in my projects. Since I start my work with ADO, I have some troubles and questions.At first, I have MDAC 2.8 SP1 and SQL Native Client from MS SQL Server 2005. Here's list of them: What difference between "SQL Native Client" and "Microsoft OLE DB Provider for SQL Server" I have troubles with understanding API cursors: all my sql-statements always returns Forward-Only Cursor Type. Here's little test about it written in VisualBasic: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Commd As New ADODB.Command Dim Co ...Show All
SQL Server Simple convert question!
Hello all! Never did a convert, I been looking for samples but I don't quite get it. I get this error message in my vb.net app, Taking a number value from a textbox, adding it to a table, with a money field. "Implicit conversion from data type money to nvarchar is not allowed. Use the convert function to run this query" Here is the SP it's pulling, CREATE PROCEDURE dbo.AddWg (@UserID NvarChar(50), @Credits Money) AS IF EXISTS (SELECT 1 FROM Bankroll WHERE UserID=@UserID ) begin Update BankRoll Set Credits = Credits + CAST(@Credits as money) where userID = @userID return -1 end ELSE begin Insert Bankroll (Credits, UserID ...Show All
.NET Development SQLDataReader.GetOrdinal() fails rarely with IndexOutOfRange
Hi everybody, We were developed some Web-Services that run against SQL Server 2000 with SQLDataReader that executing Stored Procedures in the DB. Most of time (95%) everything is running well, but sometimes (when exactly, we don't know) the same WebService that worked 200 times, fail. The code is simple: public string myFunction( int ANumber ) { string strRetVal = null ; SqlDataReader myReader = null ;   ...Show All
Windows Forms .NET application crashes until it is moved to another directory
Hello I have a very strange behaving: I have a compiled .NET application which uses System.Windows.Forms and some dlls which I have written. All dlls are pure managed code dlls. I work with .NET Framework 1.1 and Visual Studio .Net 2003 on a platform with Windows XP professional SP 2. When I start the application in its Debug folder It crashes when I close its main window. In the Folder Debug thre is only my application (MyApp.exe). The assembly it depend on are all stored in the assembly cash. When I rename the folder "Debug" to "gaga" or when I move the application to another folder on the disk I can start the application and it runs ...Show All
Visual C# Serializing Derived Classes
Ok, I posted this in the wrong forum, so I'm trying again... I'm trying to create a class that inherits from the System.Windows.Forms.TreeNode class. I'm basically doing this to add a few properties to the class. My question is how can I ensure that these properties are properly serialized. If I was inheriting from one of my controls, I'd just do something like this: public SCNNode(SerializationInfo si, StreamingContext context) : base (si, context) and the function would search the serialization info object for a reference to my custom properties. However, I can't do this since the TreeNode's serialization constructor i ...Show All
Visual Studio Team System Users can't configure their Project Alerts
We are using TFS and we've having some issues configuring project alerts. I am the Project Administrator and I was able to configure Project Alerts for myself using Visual Studio 2005. I have checked the option 'My work items are changed by others' and I have specified my own e-mail address in the 'Send To'-field. This works just fine and I do get notified when something changes. However, I have two other users that are Contributors in the project (I'm not sure if this is related to the problem), but they're not able to properly configure their Project Alerts: They use Team Explorer to open the Project Alerts dialog box of our pro ...Show All
Visual Studio Upgrade to VB.net 2005 gives - the given assembly name or codebase was invalid
Just upgrading a VB.NET COM enabled DLL (class library) from VS 2003 to VS 2005 I am getting this error message... Error 1 'The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)' C:\company5\BusClassNET04\LC companybusinessclass5 The file LC does not exist Another similar project compiles OK so I am really confused as to why this is happening. I have tried shortening the assembly name. I don't really understand codebase but the text "codebase" does not occur in the entire project. Any help would be appreciated Where is a comp ...Show All
Visual Studio Tools for Office [InfoPath][C#] Convert a form to a PDF
Hi, I got an info path form and i want to transform it in a pdf file and email it I'm not server side, my info path app runs on a "simple" PC, i've heard about FOP but i don't think it's applicable (tell me if i'm wrong) My goal is to generate a pdf from my InfPath form and email it, does anybody realize that If yes how Hi, The HTML to PDF library for .NET from http://www.dotnet-reporting.com or the HTML to PDF converter from http://www.winnovative-software.com is what you need. It's pure .NET library, it doesn't use a printer driver. There is also a free html to pdf converter application bu ...Show All
Visual C++ Type Conversion from _varaiant_t to CByetArray
hi guys. I am doing a Database application in Visual C++. i am accessing the recordset by mean of adodb::recordset pointer. I have to get the longraw data having picture stored in it and then i have to draw the image of that data. i have acees the data in recordset but unable to convert it into CByteArray or any other format. Please help me in this regad. This is not the right forum for such questions. Try the MSDN newsgroups http://msdn.microsoft.com/newsgroups/ or try the Code Project Visual C++ forum http://www.codeproject.com/script/comments/forums.asp forumid=1647 Kifayatullah wrote: hi guys. I ...Show All
Visual C++ Opening other forms from main form with buttons.
Hello, How do you open another form from the "Main" form. I wish to have "buttons" on the main form where when you click them the other forms come up. How would this be accomplished Put the button on your form. Double click on it in the designer, this generates a method which is called when you click the button. In the code, put Form2 dlg = new Form2(); if (DialogResult.OK == dgl.ShowDialog()) { // the user clicked OK } Of course, you need to use the name of your form, and if it''s Form2, you need to start using meaningful variable names :-) ...Show All
Windows Forms Overlap
in my application, i draw an ellipse (or rectangle), how can i draw another ellipse (or rectangle) that it is not overlap the first ellipse(or rectangle) in my application, i draw an ellipse (or rectangle), how can i draw another ellipse (or rectangle) that it is not overlap the first ellipse(or rectangle), the second ellipse is drawn random. ...Show All
Windows Forms List All Forms In Project
I want to be able to list all forms in the project and also to manipulate with controls within them. I genereate the code as below: Dim MainAssembly As System.Reflection.Assembly Dim cWinForm As System.Type Dim WinType As Type Dim WinTypes() As Type MainAssembly = System.Reflection.Assembly.GetExecutingAssembly cWinForm = GetType (System.Windows.Forms.Form) WinTypes = MainAssembly.GetTypes For Each WinType In WinTypes If WinType.GetType Is cWinForm.GetType Then MsgBox(WinType.Name) End If Next But code above gives me only type of all project forms. I want to be able to access these forms but I dont kno ...Show All
Visual C# Creating Partial Class in VS2005
Hi, I am new to VS. How can i create partial class in VS2005 do i first have to create the class and specify it as partial regards, rnv Yeah, just create a class and put the keyword "partial" in front of the keyword "class". That's all there is to it. ...Show All
Visual C++ Best practice: P/Invoke or C++/CLI?
If I need to access unmanaged code (Win32 dll or a 3rd party dll), I routinely find myself creating a C++/CLI class library project type (dll) and creating a few wrapper classes (and usually refactoring for simpler interfaces than the original function being called). After it's built, it's a .NET assembly that I can access from C# or whatever. I find it easier to do than using P/Invoke directly from C# (although creating a DllImportAttribute is not terribly difficult). Beyond a personal preference for either mechanism, are there any performance issues between the two Is one techique better than the other As a best practice, should I opt ...Show All
Windows Forms drawing a table in C#
Hi all, well, this is my situation: I want to draw a table on a user control with 2 cxolumns and x rows. Everything works fine, however, if I scroll up/down, the table looks quite strange as it is repainted all the time. Is there any way to solve this Thx for the help! Regards, Mel hi, well i am also trying to do the same i.e i want to draw a table on a RichText Control, can u tell me how to draw a table. It would be great if you could sendsome code Thanks ...Show All
