Archived Months
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
all groups > vb.net data > june 2005

Cannot Detach Database because it is currently in use
Posted by RSH at 6/30/2005 4:22:03 PM
I am programatically detaching several databases. Basically I am looping through 5-15 databases and detaching them to be moved to another server. The script is working great except the last database in the loop always generates the error: Cannot detach database <db name> because it is curr...more >>


SQL Logic to test if exists part 2
Posted by RSH at 6/30/2005 9:10:05 AM
I am having to accomplish two things in a single SQL statement. I need to test first to see if a DATABASE Exists and if it Does...Drop it and create it again (changes were made)...if it doesnt exist just create it. This code seems to work good: IF NOT EXISTS (SELECT name FROM master.dbo.sys...more >>

Brand Spanking Newbie ADO.NET Question
Posted by Eric Robinson at 6/30/2005 6:24:26 AM
I'm trying to write my first ADO.NET application. In my form, I have: <snip> Imports System.Reflection Imports System.Data Imports System.Data.OleDb Imports System.Data.SqlClient Imports System.Data.Odbc Imports System.Data.Common Imports System.IO Imports System.Text.RegularExpression...more >>

FillSchema Doesn't bring SQL Server Default Values
Posted by Programmer at 6/30/2005 12:00:00 AM
Hi All Here is my problem I'm using a SQLDataAdapter and DataSet I use the method FillSchema(myDataset, SchemaType.Source) The problem is that when i Check the default Values of the Dataset i can see that the DefaultValue of the columns is system.dbnull!!!! But in SQL Server i have put a...more >>

Checking to see if a database exists
Posted by RSH at 6/29/2005 3:08:31 PM
I'm creating databases programatically in .Net and I want to verify that the database doesn't exist before creating it. i found the SQL code: IF NOT EXISTS(SELECT * FROM <databasename>) But when I run the code against a known database, even in SQL Management Studio I get a "Incorrect syntax...more >>

Update MS Access Database Records
Posted by thomasp NO[at]SPAM msala.net at 6/28/2005 12:36:01 PM
First of all, thanks for the help on my previous VB.NET/MS Access questions. This time I need do the following 1. Connect to a table 2. step through each of its records 3. read the value of two of the records fields 4. pass those values to a function 5. write the value returned by the funct...more >>

DataGrid / DataView Problems
Posted by NetRacer at 6/27/2005 12:00:00 AM
hi, i have a DataGrid with a DataView as source. the data is read correctly from the db and shown on screen. the problem appears, when i want to add some rows to the grid. first it adds them and the ListChangedEvent from the DataView raises and the new values are shown correctly. but if ...more >>

DataReader
Posted by Viswanathan S at 6/27/2005 12:00:00 AM
Hi All, I often get the same error when filling data adapter. There is already an open DataReader associated with this Connection which must be closed first -- ______________________________ S. Viswanathan ...more >>



Insert data from excel to SQL server
Posted by at 6/27/2005 12:00:00 AM
Dear all, I try to run the code as the following: Dim ExcelConnection As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inventory\book1.xls;Extended Properties=""Excel 8.0;HDR=No;"";") Try ExcelConnection.Open() ...more >>

Add record to Access database
Posted by thomasp NO[at]SPAM msala.net at 6/25/2005 10:21:45 AM
What do I need to add to the following code to be able to add a record to an Access Database using VB.NET 2005 Express? Dim da As New OleDb.OleDbDataAdapter("Select * from LCMR", cn) Dim dt As New DataTable() da.Fill(dt) Dim dr As DataRow dr = dt.NewRow With dr .Item("ATime") = ...more >>

Add Record to MS Access Database
Posted by thomasp NO[at]SPAM msala.net at 6/25/2005 12:00:00 AM
Is there anyone that knows how to add a record to a MS Access database with VB.NET. I have search for 3 days for some code that works. I have gathered bits and pieces of code and put it together, but I have not found a solution that works. If anyone has some code that works please reply. Th...more >>

Get data from excel to sql server
Posted by at 6/24/2005 12:00:00 AM
Hi all, I try to test that get data from excel to sql server. My code as the following: Dim ExcelConnection As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "c:\test.xls" & "; Extended Properties=""Excel8.0;HDR=No""") Try ExcelConnection.Open() ...more >>

Filtering dataset.
Posted by Srinivas at 6/22/2005 5:00:03 PM
Hi, I have a DataSet with a couple of datatables in it. I would like to filter the datatables in this dataset with a particular condition and assign these data tables to a new Dataset. So the resultant DataSet is a subset of the original Data Set. Please let me know the best way of doing t...more >>

Maybe it's me - BUT
Posted by Rob at 6/20/2005 3:13:22 PM
I am having a very hard time getting samples from multiple dotNet Books to work... Is it me... my installation of VS... or the authors... ? I get this error message when running the authors code.... An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.dat...more >>

newbie-how to disable add new row in grid?
Posted by George Hardy IV at 6/20/2005 12:05:25 PM
Hi everyone, I was wondering how you disable the "add new" row on a datagrid? I have other selection stuff that does the insert, so I dont want them entering new rows directly into the grid. How do you turn it off? thanks george hardy ...more >>

Cannot make Access close programmatically
Posted by Rob Hughes at 6/20/2005 10:08:15 AM
I am writing an external app that utilizes. The app needs to be able to run repeatedly, but I am having a problem because Access will not close. When ..Quit is called, it pops up a blank Access window, which will not close by normal means, only by ending the process in Task Manager. Here is th...more >>

Files, Datasets And Databases
Posted by Kerr at 6/20/2005 7:07:38 AM
Hi all, I am sure this has been done before but I just don't know the right way to do it. I have a collection of CSV files in a directory on our network. I need a method of getting the files into a SQL Server database. Now I can import the contents of the files into a XNK Document But o...more >>

I am doing something wrong (ADO.NET)
Posted by Rob at 6/20/2005 12:26:13 AM
I am trying to get an example from a book to work... I am new to dot net so it is likely I am doing something wrong. I added a new module and created the function below which is run from a button. When I click the button, nothing hapens (or at least I do not see anything happen). Func...more >>

Usiing ghost datatables in SQL
Posted by Eric Dreksler at 6/17/2005 1:16:09 PM
Hi, I'm trying to figure out how (or if possible) to use a datatable in a SQL statement (either against a db table or another ghost datatable). Basically, I have a text file I'm processing into a datatable I created, and I want to bounce it off a table in the db, as well as off of another...more >>

MappingName
Posted by Raju Joseph at 6/17/2005 12:00:00 AM
Hi All, How can I determine what the MappingName is for a DataGrid? Right now, I am using DataGrid.DataMember to determine the MappingName. But this fails, if the DataGrid holds a DataRelation. Thanks, ...more >>

Simple Add Modify Delete and Navigation Buttons for - Database Acc
Posted by Manish Sawjiani at 6/16/2005 11:57:09 AM
Dear Friends, Am new to vb dot net. I want to create a simple form with text boxes and Add-Modify-Delete Buttons along with navigation buttons to move next, move previous, move first and move last. An example for this would go right upto the bottom of my heart and hope to the bottom of my bra...more >>

Close SQL Connections to perform Detach Database
Posted by KFX at 6/16/2005 8:44:04 AM
Hello, I have developed an application that uses SQL Server 2000. When I create a connection from code or by using dataset I can't close it; it closes only by exiting the application (I can see it from the Enterprise Manager). The problem is that I want to perform a Detach Database operation...more >>

USING SQL COMMAND TO DELETE A RECORD IN VB.NET APPLICATION
Posted by FLORENCE EWURUJE at 6/16/2005 8:35:39 AM
Sir, I am new to programming in vb.net. I am trying to develop a simple application to contain Add, Find, Update, Delete Record command button on the GUI. I have been able to add new record and also use the Find Command sucessfully but I have been having a problem with the Update and Delete com...more >>

Returning contents of a Field from DSN
Posted by Rob at 6/13/2005 7:10:24 PM
I am trying to connect to a proprietary database using a DSN If the following were to work... how would I store the contents of Customer from the Select statement below to a variable ? sConnString = "DSN=TestDSN" oODBCConnection = New Odbc.OdbcConnection(sConnString) strSQL = "Select ...more >>

Connect to ODBC datasource
Posted by Rob at 6/13/2005 6:03:04 PM
I have created a System Datasource to a proprietary database. I am able to use tools such as MS Access to link to the datasource. Can this be done using VB.net 2003 ? If so how ? Thanks ...more >>

SQL connect
Posted by kpg at 6/13/2005 10:35:57 AM
Hi all, A novice vb.net.question. I have a SQL Server 2000 DB running on my LAN. On the dev computer I can use the Server Explorer to connect to it, under an account I created in the Enterprise Manager on the server. I, however, want to create my own connection object, set the connection...more >>

DataGrid stop readonly cells receiving focus
Posted by Greg Peck at 6/13/2005 12:00:00 AM
Hi, I have a DataGrid with lots of custom bits but I can't work out how to stop a cell that is read only from accepting the focus. (Some cells are readonly dependant on data in other cells). Any ideas appreciated, thanks Doug ...more >>

Binding to custom collection
Posted by Steve Amey at 6/13/2005 12:00:00 AM
Hi all I have a grid and some TextBoxes on a form. I am trying to bind to a Custom Collection rather than a DataSet which I have been doing in the past. Binding the Grid to the collection is ok, but I don't know how to bind the TextBoxes to the collection. In the past, to bind the TextB...more >>

Offline/Online
Posted by John at 6/12/2005 12:13:25 AM
Hi I need to write a vb2005/sql server2005 app running over a LAN. Some users who use laptop need to have the app to have an offline mode for when they are away. I am new to net and would like to know what will be the differences in the online-only and online/offline versions of the app? As...more >>

Program is running slow
Posted by kesk at 6/7/2005 12:00:00 AM
Hi All I have an SQL database to access records. The program is in Vb.net and using Component1 Dataobjects, created the DAL. What i have seen is the program is running a bit slow (not very slow). The database is not very big and there are less than 200records in each table. Loading the data...more >>

Why KeyDown, KeyPress and KeyUp events NOT firing in DataGrid?
Posted by Robert at 6/6/2005 3:53:21 AM
Hi! There, I am trying to put some code in the above mentioned events to detect if the cell content is modified, but these events are never trigered! Why? Any ideas? Thanks! ...more >>

Closing SQL Connections
Posted by 11Oppidan at 6/5/2005 4:59:08 PM
Hi, I have a VB .NET program that uses ADO SqlClient dataadapters and MS SQLS. It uses the Master db to return the names of attached databases, and then connects to each one to check whether it is a specific type of database or not by looking for a specific table (any ideas of a better way to...more >>

searching a DataView
Posted by NetRacer at 6/3/2005 12:00:00 AM
how can i search a DataView without changing the sort order? ...more >>


DevelopmentNow Blog