Answer Questions
mwherman2000 What about Locking from vb.net
i am facing a little problem in a scnario, i have developed an applicaton which uses sql server as backend database server. i have a table named products which has a column of stock now, how can i prevent many users from making a mistake of selling a thing which is already sold by another vendor that means it is not available in there stock but the purchase order they have opened is indicating the purchase made...................it has not ...Show All
Padvit NullReference Error
I recently installed Visual Studio 2003 upgrade and made sure that the .net framework on my computer has been upgraded too. Now the .aspx page I am working on is giving me a "System.NullReferenceException: Object reference not set to an instance of an object" error. Here is my code: VB.net: Does the error stack indicate what line is causing the problem I have seen situations like this in the past where controls were no longer declared ...Show All
atudela I need a VB.Net code to attache a Database to a SQL Server . any help please
Have a look at the following article, which gives information on how to use attach and detach databases using SQL: http://databasejournal.com/features/mssql/article.php/2224361 This should get you started. To execute this SQL, have a look at the SqlCommand and SqlConnection objects. ...Show All
Jeffrey K. Ericson Application_AcquireRequestState Execute twice per request
Code inside of the global.asax file on the Application_AcquireRequestState event fires twice for each request. One the first request I have session state and on the second, I do not. Here is simple test I ran to verify that it is running twice: Protected Sub Application_AcquireRequestState(ByVal sender As Object, ByVal e As System.EventArgs) If Request.IsAuthenticated Then &n ...Show All
Jeff Zheng No Processor performance counters
I'm just starting to use .NET (in C++), and wrote a small windows forms app that displays CPU usage. It runs fine on the computer I wrote it on, but on another computer it crashes because there's no Processor category for performance counters. How do I add this category Hi, I've run into this same problem. For a quick check, on the computer that it fails on, try going to the start menu->run->perfmo ...Show All
David McC TableAdapter Update problem
Hello, i have problem in my application. I create dataset with single table. In MainForm i have 2 texboxes and update button. This is code for update button: [CODE] Klient klient = new Klient(); klient.ShowDialog(); KlientDataSet dataSet = new KlientDataSet(); Serwis.KlientDataSet.KlienciRow klientRow = dataSet.Klienci.NewKlienciRow(); klientRow[0] = Guid.NewGuid(); klientRow[1] = klient.Imie; klientRow[2] = klient.Nazwisko; ...Show All
Uwa Agbonile How to use System.Net.Mail.SmtpClient via SSL and Authentication?
Below is my code, and is just blocked there. There is no any error message. '=============================================> Dim msg As String = "---" Try Dim strAddress As String = " xxx@xxxx.com " Dim s ...Show All
Kaz RAISERROR not causing SqlException
Hi all, I am developing on VS 2005 Beta 2 and I am having a problem with the Sql data provider. In a stored proc I am calling RAISERROR with a severity of 16 as below RAISERROR ( 'My error' , 16, 1) and then immediately calling RETURN but this is not causing an SqlException to be raised in my C# client code. If have tried this aganist Sql Server 2005 and Sql Server 2000 and it doesn't work against either. Any else had problems with this ...Show All
EcnS Implement custom exception handling?
Hello, how can I apply custom exception handling in my project For example I have a class called PersonDALC.cs it has methods for inserting, updating, deleting and selecting but any of these can throw errors. The question is if I must rethrow or should I make custom exceptions If so how can throw the custom exceptions and how can I catch those custom exceptions inside controls like formsview, detailsview or gridview, I was looking at the ...Show All
kimberst SqlDataSourceEnumerator problem
Hi, Can anyone confirm the following behaviour And if so, is there a logical reason, or is it a bug I have deployed our application to a machine that is not part of a domain. It is in fact, a virtual machine. The configuration screen of the application uses the GetDataSources method of SqlDataSourceEnumerator and lists the found SQL Servers. I have SQL Server Express installed on the machine but when the configuration screen is dis ...Show All
Khalid Hanif ADO.NET Driver of Sybase
I need to connect to a Sybase database server (Version : 11.0.3.3); are there any free ADO .NET driver for Sybase 11 Preferably native driver; having no dependency on any other thing like Sybase Open Client, as my web application is needed to deploy on a commercial web hoster. If anyone has personal expereince; please share. Hi, You dont need a specific provider for a Sybase database. OleDb provider and ODBC provider can be used to connec ...Show All
chip_cary DateTime.Parse problem
The following code produces the same DateTime value, and it shouldn't: ================================================== private DateTimeFormatInfo df = new DateTimeFormatInfo (); df.FullDateTimePattern = "d MMM yyyy HH:mm:ss z" ; DateTime dt2 = DateTime .Parse( "Mon, 1 Jan 0001 00:00:00.000 GMT", df ).ToUniversalTime(); DateTime dt3 = DateTime .Parse( "Tue, 2 Jan 0001 00:00:00.000 GMT", df ).T ...Show All
Rovshan AppDomain.AppendPrivatePath Depricated
I get a CS0618 that AppDomain.AppendPrivatePath is obsolete. The suggestion is to use AppDomainSetup.PrivateBinPath instead, but no matter how I set it, PrivateBinPath remains null. I am trying to update AppDomain.CurrentDomain after the domain is started. Is AppDomainSetup the correct way to go It seems this would only apply at creation of the domain, and I need to make this modification after the AppDomain has started. Thanks ...Show All
Labrego Showing data in a DatagridView or ListBox - VB 2005
Hello, i made a ODBC connection and it works. The problem is, i want to display the data in a datagrid o listbox and i just get blank fields in the grid, and in the listbox i get "System.Data.DataRowView". As a novice i don't know what's the inconveninet. Help please.. This is the code: Dim StrConn As String = "DSN=blabla;UID=user;PWD=password" Dim MyConn As New OdbcConnection(StrConn) Dim MySelect As ...Show All
cstackable Will AnyCPU cause binaries to run as 64-bit on x64 machine
I used VS2005 professional to compile 18 .Net assemblies using the AnyCPU platform setting in configuration manager. I also have a startup executable that calls into one of the GAC libraries to start/run the program. I compiled both the program and all assemblies on at 32 bit Windows 2000 OS using the "AnyCPU" platform setting On the 64-bit computer running XP-Professional(64)... All assemblies were successfully loaded a ...Show All
