How Do I Quickly Populate A New Database With Place-holder Content?

Apr 28, 2008

I am using SQL server to create a rather complicated client database for a nonprofit organization. I have access to an ancient version of the database in Access format, but would rather create a new database from scratch instead of "up-sizing" the old database. Although the old database is mostly useless, it contains a goldmine of names and addresses that I could use to populate the new database that I'm creating.
My question is this: Is there any relatively easy way to cut and paste from external data sources into a new SQL database? For example, I would love to just select twenty rows of "first names" from the old database and then paste that into my new table. Can anyone suggest any quick and easy tricks for populating a new database with place-holder content?
Thanks!


 

View 2 Replies


ADVERTISEMENT

How To Quickly Fill A Database

Apr 23, 2008

I have a database with a couple of tables i need to expand to 4 gigabytes in order to run some tests. (currently 300 megs)
Does anyone have a script or some method that would quickly populate my tables with random data so that i can grow my database to the desired size for testing.

Thanks

I have SQL server 2005 express. I have the management studio installed too.

View 4 Replies View Related

Change Database Collation - Quickly

May 19, 2004

There have been several threads about changing a database's collation but none have come up with an easy answer before.
The suggestion before was to create an empty database with the correct collation and then copy the data across.
However this is hard work as you have to populate tables in a specific order in order not to violate foreign keys etc. You can't just dts the whole data.

There follows scripts we have written to do the job. If people use them, please could you add to this thread whether they worked successfully or not.

Firstly we change the default collation, then change all the types in the database to match the new collation.

===================
--script to change database collation - James Agnini
--
--Replace <DATABASE> with the database name
--Replace <COLLATION> with the collation, eg SQL_Latin1_General_CP1_CI_AS
--
--After running this script, run the script to rebuild all indexes

ALTER DATABASE <DATABASE> COLLATE <COLLATION>

exec sp_configure 'allow updates',1
go
reconfigure with override
go
update syscolumns
set collationid = (select top 1 collationid from systypes where systypes.xtype=syscolumns.xtype)
where collationid <> (select top 1 collationid from systypes where systypes.xtype=syscolumns.xtype)
go
exec sp_configure 'allow updates',0
go
reconfigure with override
go
===================

As we have directly edited system tables, we need to run a script to rebuild all the indexes. Otherwise you will get strange results like comparing strings in different table not working.
The indexes have to actually be dropped and recreated in separate statements.
You can't use DBCC DBREINDEX or create index with the DROP_EXISTING option as they won't do anything(thanks to SQL Server "optimization").
This script loops through the tables and then loops through the indexes and unique constraints in separate sections. It gets the index information and drops and re-creates it.
(The script could probably be tidied up with the duplicate code put into a stored procedure).

====================
--Script to rebuild all table indexes, Version 0.1, May 2004 - James Agnini
--
--Database backups should be made before running any set of scripts that update databases.
--All users should be out of the database before running this script

print 'Rebuilding indexes for all tables:'
go

DECLARE @Table_Name varchar(128)
declare @Index_Name varchar(128)
declare @IndexId int
declare @IndexKey int

DECLARE Table_Cursor CURSOR FOR
select TABLE_NAME from INFORMATION_SCHEMA.tables where table_type != 'VIEW'

OPEN Table_Cursor
FETCH NEXT FROM Table_Cursor
INTO @Table_Name

--loop through tables
WHILE @@FETCH_STATUS = 0

BEGIN
print ''
print @Table_Name

DECLARE Index_Cursor CURSOR FOR
select indid, name from sysindexes
where id = OBJECT_ID(@Table_Name) and indid > 0 and indid < 255 and (status & 64)=0 and
not exists(Select top 1 NULL from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where TABLE_NAME = @Table_Name AND (CONSTRAINT_TYPE = 'PRIMARY KEY' or CONSTRAINT_TYPE = 'UNIQUE') and
CONSTRAINT_NAME = name)
order by indid

OPEN Index_Cursor
FETCH NEXT FROM Index_Cursor
INTO @IndexId, @Index_Name

--loop through indexes
WHILE @@FETCH_STATUS = 0
begin

declare @SQL_String varchar(256)
set @SQL_String = 'drop index '
set @SQL_String = @SQL_String + @Table_Name + '.' + @Index_Name

set @SQL_String = @SQL_String + ';create '

if( (select INDEXPROPERTY ( OBJECT_ID(@Table_Name) , @Index_Name , 'IsUnique')) =1)
set @SQL_String = @SQL_String + 'unique '

if( (select INDEXPROPERTY ( OBJECT_ID(@Table_Name) , @Index_Name , 'IsClustered')) =1)
set @SQL_String = @SQL_String + 'clustered '

set @SQL_String = @SQL_String + 'index '
set @SQL_String = @SQL_String + @Index_Name
set @SQL_String = @SQL_String + ' on '
set @SQL_String = @SQL_String + @Table_Name

set @SQL_String = @SQL_String + '('

--form column list
SET @IndexKey = 1

-- Loop through index columns, INDEX_COL can be from 1 to 16.
WHILE @IndexKey <= 16 and INDEX_COL(@Table_Name, @IndexId, @IndexKey)
IS NOT NULL
BEGIN

IF @IndexKey != 1
set @SQL_String = @SQL_String + ','

set @SQL_String = @SQL_String + index_col(@Table_Name, @IndexId, @IndexKey)

SET @IndexKey = @IndexKey + 1
END

set @SQL_String = @SQL_String + ')'

print @SQL_String
EXEC (@SQL_String)

FETCH NEXT FROM Index_Cursor
INTO @IndexId, @Index_Name
end

CLOSE Index_Cursor
DEALLOCATE Index_Cursor



--loop through unique constraints
DECLARE Contraint_Cursor CURSOR FOR
select indid, name from sysindexes
where id = OBJECT_ID(@Table_Name) and indid > 0 and indid < 255 and (status & 64)=0 and
exists(Select top 1 NULL from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where TABLE_NAME = @Table_Name AND CONSTRAINT_TYPE = 'UNIQUE' and CONSTRAINT_NAME = name)
order by indid

OPEN Contraint_Cursor
FETCH NEXT FROM Contraint_Cursor
INTO @IndexId, @Index_Name

--loop through indexes
WHILE @@FETCH_STATUS = 0
begin

set @SQL_String = 'alter table '
set @SQL_String = @SQL_String + @Table_Name
set @SQL_String = @SQL_String + ' drop constraint '
set @SQL_String = @SQL_String + @Index_Name

set @SQL_String = @SQL_String + '; alter table '
set @SQL_String = @SQL_String + @Table_Name
set @SQL_String = @SQL_String + ' WITH NOCHECK add constraint '
set @SQL_String = @SQL_String + @Index_Name
set @SQL_String = @SQL_String + ' unique '

if( (select INDEXPROPERTY ( OBJECT_ID(@Table_Name) , @Index_Name , 'IsClustered')) =1)
set @SQL_String = @SQL_String + 'clustered '

set @SQL_String = @SQL_String + '('

--form column list
SET @IndexKey = 1

-- Loop through index columns, INDEX_COL can be from 1 to 16.
WHILE @IndexKey <= 16 and INDEX_COL(@Table_Name, @IndexId, @IndexKey)
IS NOT NULL
BEGIN

IF @IndexKey != 1
set @SQL_String = @SQL_String + ','

set @SQL_String = @SQL_String + index_col(@Table_Name, @IndexId, @IndexKey)

SET @IndexKey = @IndexKey + 1
END

set @SQL_String = @SQL_String + ')'

print @SQL_String
EXEC (@SQL_String)

FETCH NEXT FROM Contraint_Cursor
INTO @IndexId, @Index_Name
end

CLOSE Contraint_Cursor
DEALLOCATE Contraint_Cursor

FETCH NEXT FROM Table_Cursor
INTO @Table_Name
end

CLOSE Table_Cursor
DEALLOCATE Table_Cursor

print ''
print 'Finished, Please check output for errors.'
====================

Any comments are very welcome.

View 1 Replies View Related

Transferring A LARGE Database To A New Server - QUICKLY!!!!

Nov 13, 2000

Good morning one and all,

I need to transfer a database (contining one table) containing over 35 million records from one server to another. I have two options at present :
(a) Use DTS to do the transfer
(b) Copy the mdf file across and sp_attach_db it

Does any1 have a better idea, or does any1 know which of the two methods will be the quickest?

TIA

Gurmi

View 1 Replies View Related

Is There A Place Where I Can Find The Events That Takes Place In Sql Server?

Jul 20, 2007

Is there a place where i can find events that takes place in the sql server? Like adding data to a database or something like that....



Regards

Karen

View 4 Replies View Related

Database Backup To Different Place

Mar 11, 2004

Hi All!

I know that if is want to backup my db on the c: drive i do this
BACKUP DATABASE DBName
TO DISK = 'c:isl_fs1DBName.bak'

BUT HOW do I take this to the network. I tried
BACKUP DATABASE DBName
TO DISK = '\isl_fs1DBName.bak'
it doesn't work please help

View 2 Replies View Related

Can You Use A VARIABLE In Place Of A Database Name?

Apr 8, 1999

Does anyone know if it is possible to use a variable in place of a database..table combination in a select statement

For Example: Instead of using the following with each database hardcoded in the SP:

select @dataused = sum(b.reserved)
from DBSglep..sysindexes b
where b.indid in (0, 1, 255) and segment != 2

I would like to loop for every database listed in sysdatabases and do this:

select @dbname = @dataname+'..sysindexes'

select @dataused = sum(b.reserved
from @dbname b
where b.indid in (0, 1, 255) and segment != 2

I have got the loop working, but just can't get the name substitution working as MSSQL dosn't seem to allow a variable after the FROM statement (it only seems to work with a hardcoded specific database..table name).

Any assistance in resolving this problem would be greatly appreciated! :-)

Many thanks in advance...

Regards,
Wayne

View 2 Replies View Related

Backup Database At Different Place

Mar 11, 2004

Hi All!

I know that if is want to backup my db on the c: drive i do this
BACKUP DATABASE DBName
TO DISK = 'c:isl_fs1DBName.bak'

BUT HOW do I take this to the network. I tried
BACKUP DATABASE DBName
TO DISK = '\isl_fs1DBName.bak'
it doesn't work please help

View 2 Replies View Related

Database Saving Place

Nov 11, 2006

Hello,

My english is not the best, but i will try my best.

I want to change the saving folder for the database from my systempartition to my datapartition (from c:labla to d:mydata), but i dont know how. I can see the folder but it is in gray font and unchangeable.

Greetings Thomas

View 1 Replies View Related

Create Copy Of Database And Place On Different Server

Oct 26, 2004

All,
I am trying to create a copy of an existing database and place on a different sql server for testing purposes. Currently my method of doing this is to create a backup, then restore a database on my new sql server. But here is the problem I am running into. When I look in Enterprise manager I can see all of the stored procedures and tables and data just fine, which is how I would like it. But, when I open up Query Analyzer I am not able to run any queries because it says "invalid object name" error. I know that the object name is correct. I think that I am having a conflict between the users which were carried over from the source backup file and the users that are on my 2 new sql server. If anyone could help, I would really appreciate it. I am stuck at this point. I am guessing it is probably something simple I am just unaware that I need to do.

Thanks,
LinsLo

View 3 Replies View Related

How To Store A Content Into Database

Aug 22, 2006

Hi everyone,
 
I'm just using TEXTBOX control to save data into my DB. My question is, if I have multiple lines of sentences, it does not store as what it looks like. For example;
 
Hello, Mike
 
It stores into the database as "Hello, Mike" and if I read from the database, it does not have seperate lines and shows it like this;
Hello, Mike
 
How can I store the contents into database and make the contents as original? (Sorry for the poor English, but I hope you understand it.)

View 2 Replies View Related

Merge Database Content

Jul 23, 2005

hi,i have a sqlserver CE and a sqlserver database.The tables are exactly the same on both databases.the sqlserver CE database Content will be synchronized with thesqlserver database with insert orders..is there a way to merge the two databases?this would be great cause different content will be inserted in bothdatabases. After a synchronisation both databases should have the samecontent..i hope you understood my problem. my english is not very well..christian

View 1 Replies View Related

Formatting Database Content

May 16, 2006

HiI have set up a SQL database to contain alist FAQ's for our company andthen plan to pull this info off using a web page.So far I have entered the data but I am unable to control how it isdisplayed inside SQL ie I cannot enter new blank lines I have triedusing lots of spaces but this does not work when I use the website todisplay the info.Is there a way of formatting and editing the data in the sql databaseas I am unable to do this, if I try to edit the data in the database Ihave to copy it to notepad delete what is in the database, edit thetext in notepad then paste it back in.There must be a better way.Please helpalamb200

View 8 Replies View Related

Web Content Database. Is There A Limit?

Jul 20, 2005

HiI've developed a simple web service that lets people easily set up their ownwebsites, and keep them up-to-date themselves.I'm storing all the content, including images in the SQL 2000 database. Sofar it's working well enough. Is there likely to be a performance orreliability problem as the system grows?You can see it in operation here: www.up-to-the-minute.comIt's early days and any comments and ideas are welcome.John SouthPangbourne UK

View 1 Replies View Related

How To View Content Damaged Database

May 6, 2015

One of my employes deleted a MSSQL Database instead of detach. Now i tried to recover the .mdf and .ldf file but when i trie to attach it it says. "File is not a primary database file"

View 5 Replies View Related

How To Copy A Database's Content Into A New One On The Same Server?

Aug 29, 2007

Hi,
I'm using SQL Server 2005 Management Studio Express.
I have a database used for an application and I need another copy of that database so I can fix some bugs.
I tried attaching the mdf to the second database but it gives an error.(a database is allready attached)
I need the 2 databases on the same server.

Thanks,
Medeea

View 5 Replies View Related

Is There Any Method To Back Up The Database To Place Outside Of The Local Server System?

May 17, 2007

Hi, all experts here,

Thank you very much for your kind attention.

I am wondering if we could back up the databases to any place outside of the local server system? As I found, we can only back up the database to the local server system, so we have needs to share databases on network places. Is there any method to back up the database on network place rather than first of all I have to back up the database on a local server system, then copy it to the network place, that just sounds really inconvenient.

Thanks a lot in advance for your help and I am looking forward to hearing from you shortly.

With best regards,

Yours sincerely,



View 5 Replies View Related

Populate Database Tables With Data From Another Database

May 2, 2008



I have two Databases with the same name that reside in different servers. The two servers are linked servers. Each database consists of 5 Tables. The tables have identical names in each database.

The database in ServerA has 5 tables with data, the database in ServerB also has 5 tables with the same schema as ServerA, however the 5 identical tables in ServerB contain no data.

I need to populate the 5 tables in ServerB with the Data from the 5 tables in ServerA.

What SQL code or script can i use to populate the 5 tables in ServerB

Below are the names of the 5 tables:

TABLE1: [ServerB].[ProdDB].dbo.[Orders]
TABLE2: [ServerB].[ProdDB].dbo.[Sales]
TABLE3: [ServerB].[ProdDB].dbo.[Employee]
TABLE4: [ServerB].[ProdDB].dbo.[Customer]
TABLE5: [ServerB].[ProdDB].dbo.[Region]


Does any one have a script that could help me with this task. Thanks

I am using SQL Server 2005

View 2 Replies View Related

Insert Text File Content Into Database

Nov 13, 2007

Hello everyone!I'm having a problem with inserting the content of a text file into a Sql Server 2005 database.I'm reading the text file into a dataset, and works fine. What I can't do is what I suspect is the simple part: Insert all the data into a table that has exactly the same configuration that the file. I've never worked with dataset's before, and I can't seem to find the answer to this!This is what I have done so far:  Dim i2 As Integer Dim j As Integer Dim File As String = Server.MapPath("..DocsFactsFORM_MAN_V3_1.txt") Dim TableName As String = "Facts"
Dim delimiter As String = "9"

Dim result As DataSet = New DataSet() Dim s As StreamReader = New StreamReader(File) Dim columns As String() = s.ReadLine().Split(Chr(9)) result.Tables.Add(TableName) Dim strs1 As String() = columns For i2 = 0 To CInt(strs1.Length) - 1 Dim col As String = strs1(i2) Dim added As Boolean = False Dim [next] As String = ""
Dim i As Integer = 0 While Not added Dim columnname As String = String.Concat(col, [next]) columnname = columnname.Replace(Chr(9), "") If Not result.Tables(TableName).Columns.Contains(columnname) Then
result.Tables(TableName).Columns.Add(columnname)
added = True Else
i += 1
[next] = String.Concat("_", i.ToString()) End If End While Next i2 Dim strs2 As String() = s.ReadToEnd().Split(Chr(13) & Chr(10).ToString()) For j = 0 To CInt(strs2.Length) - 1 Dim items As String() = strs2(j).Split(Chr(9)) result.Tables(TableName).Rows.Add(items) Next j So now I have my dataset populated with all the information, but how can I insert it into the database?If anyone can help I would appreciate very, very much!Thank you Paula 

View 1 Replies View Related

Export Image Content From Database As A File

Oct 18, 2006

Dear friends,

I have some images inside my database. How can I export the content of an image field to a file in a Windows Directory?

Thanks!

View 5 Replies View Related

Populate Arraylist From A Database

Sep 15, 2006

Hi  i'm pretty new to this, how do i connect to my database a put all the values from one column into the arraylist. Any help and a easy example would be nice Thanks in advance  Richard 

View 4 Replies View Related

Populate The Array From Database

Oct 18, 2006

Hi,   I want to populate the array with a single column values from database(sqlserver 2000)Ex. name      ageaaaa         23bbbb         43cccc         18 Now i want to populate the array with name field values. Please anyone guide me how to do this.Thanks in advanceBala

 

View 3 Replies View Related

How Can I Populate An SQL Database Graphically?

Feb 23, 2008

I am writing a small program (Visual Studio Express 2008) to help me automate populating a database graphically. The program I am writing will keep track of sales figures state by state on a map of the US. This will be accomplished by using a map of the United States overlaid with a hexagonal grid that represents individual sales regions (hexagons). Each hexagon represents a specific sales region, and there can be many sales regions within a state. This small program will populate the database with data specific to each hexagon that is selected by clicking on it with a mouse. A complete set of row entries should be sent to the database every time the mouse is clicked in a hexagon on my map. This program will capture such information as the center x,y pixel coordinates of each hexagon, row & column location of each hexagon, and the state where the hexagon is located. All of this information (HexX, HexY, RowX, RowY, State) has already been figured out or calculated, except that I need help on how to capture, display, and send this information as a new row entry into my database. I need to populate the database hexagon by hexagon, since which state they are in is determined visually.
Here is what I need to populate my database with:


Hex_No - each unique hexagon needs to have its own unique number 1,2,3,€¦.n. This should be as easy as assigning a counter that starts at 1 and increments until all hexagons have been processed

Hex_X €“ the pixel x value of the center (x,y) of the specific hexagon, which is known by the program

Hex_Y €“ pixel y value of the center (x,y) of the specific hexagon, which is known by the program

Hex_Col €“ column location of this specific hexagon, which is known by the program

Hex_Row€“ row location of this specific hexagon, which is known by the program

State €“ the current state on the map. This will be selected by me (combobox) prior to clicking on each hexagon within a given state
Each of the above is represented by a textbox on a form, except for the State field, which is represented by a combobox. When one clicks on the down arrow of the combobox, one can see that the names of the different states have already been entered and linked to the SQL database. The other textboxes are also linked to a different column in the same database; however they are currently empty due to the fact that this is the very data that needs to be captured by this program. This is what I need for this program to do for every mouse click , once I have moved on to a given hexagon within a given state:


Determine next available Hexagon Number, and assign it to current hexagon, display in textbox, send this as part of row data entry under Hexagon_No column

Capture and display the current hexagon€™s center x, and y (Hex_X, Hex_Y), display this in textbox, send this as part of row data entry under Hex_X, and Hex_Y columns

Capture and display the current hexagon€™s row and column information (Hex_Col, Hex_Row), display this in textbox, send this as part of row data entry under Hex_Col, and Hex_Row columns

Capture and display the current State that is selected manually from the list of database values, send this as part of row data entry under State column
Here is an example of what this program might look like in action:
http://farm4.static.flickr.com/3172/2285817199_d75f230f8d_o.jpg
I am not looking for anyone to write my program, but I would appreciate some ideas on how I can accomplish this. I have figured everything out except the part about displaying the new information on the textbox/combobox form, and sending it to the database as the next row entry. That€™s the part I need help with.
Thanks.

View 6 Replies View Related

How Prevent The Local Administrator To Read The Content Of The Database

Jan 15, 2008



Hi everybody,

I have an application in dotnet that uses sql express.
This application will be deployed on the user computer and I have to find a way to prevent the user to be able to read the data and access the structure of the database.

Is there a way to do this ? Even if the user is a local administrator of the computer ?

That's a difficult question, isn't it ? ;-))))

Thank you for your possible ideas,

Ciao,

Aurore

View 4 Replies View Related

Populate Textbox To Edit Database

Jun 18, 2006

hi
i have a database with a table with several columns:
ID - primery key
customer
company
now lets say i want to edit one row in the database and i have the primery key ID for that row. so i click on that row (which is displayed in a gridview) when i click I want the text that is in the customer cell to appear in a textbox1 and the same with compeny text I want it to apear in another textbox2.
so what code can i write in the GridView1_SelectedIndexChanged eventhandler to populate the textboxes?
thank you

View 3 Replies View Related

Trigger To Populate Table Or Database

Jun 3, 2006

Im a newbie with a sql table in a MSDE database that contains fields ofCustName, BrokerName, Type, Status.I am trying to write a trigger that does this:1. When a new record in a table is added, I would like the selectedfields to be copied to another table (call it Master).2. If that Master table already contains a record where the CustName =CustName, then simply ignore. If CustName does not match anything, thenadd the record to the Master TableIn other words, I am trying to create a table (or even a new database)that has unique records in it - making a master customer list.Any hints on how to get started on this?

View 6 Replies View Related

Using SSIS To Populate Database From IIS Logs

Jul 12, 2007

Hi,



I need to write a reporting app that process daily IIS logs that are averaging about 299MB a day!



I am considering using SSIS to put the log data into a sql server 2005 database.



Has anyone done this? Or does anyone know if it is possible? And without using the MS LogParser?



Thanks in advance and any help greatly appreciated!



Regards,

kitquo2.

View 4 Replies View Related

Store Blog Post Content In Text File Or Database?

May 21, 2006

    Hi. I am currently building a blog application, and I need some advice... I have the post title, post date, post by, etc stored in a database table, however I was wondering whether I should store the actual post content in the database as well or in a text file. For example, if the posts get really long would it slow down database performance or would there not be much of a difference? Furthermore, if I wanted to keep the posts private, a text file would not be ideal as it can be accessed easily by surfers... What do you recommend?Thanks a lot

View 1 Replies View Related

Access Database Synchroniser Fails With 'incorrect Format Or Content'

Feb 23, 2007

I've installed ADS on a windows mobile 5.0 device and am trying to run the sample Wizard application. It connects to the test database on the device OK, but fails to connect to the database on the desktop with the error:
"The HTTP request failed due to incorrect format or content. Try restarting the IIS server"


I've tried changing the port from 1024 in case it was already in use, but this doesn't change the error. Nor does restarting IIS (v5.1). IIS appears to be running correctly on the desktop.

Any ideas what to try next?

thanks
irs

View 8 Replies View Related

Using One Database Call To Populate 8 Grid Views

Apr 23, 2008

Hi
I'd like to be a little more efficient in my approach when using databases. Although my site is very simple with a low hit rate expected, I would still like to learn the best methods in designing server load conscious code.
Basically, I have a page where I'd like to show events broken down into days of the week (Monday - Sunday). All the events contain the same data and only difference being the day. Right now, the only way I know how to make this work is to create a unique sqlDataSource (select * where Day = Monday) then assign it to a ‘Monday’ grid view. I then repeat this same process for each day of the week.
As the data is always the same, is there a way to make only call to the database returning all the data, then close the connection and then separate the data there after. To me this seems to be a much more efficient way to manage the data???
Thanks for any help/supportRichard

View 4 Replies View Related

How Can I Copy The Content Of MS Access Table In Database SQL Using Visual Studio Basic

Sep 26, 2007

Code Snippet

Hi there,

I'm struggeling for more than a week now with this problem, without a finding the solution.

I have two databases, MS Access and SQL Server 2005 Express Edition

Using a procedure in Visual Studio i would like to copy all the records from one table in MS Access into an existing table in SQL Server (the tables have the same name and the same layout)

I tried to prepare one Dataset to copy from Access into SQL Server but when i run the command 'DaSQL.Update(DsSQL, "Tabella") nothing happens (not even an exeption has been raised), looking during debug, the DataSet seems filled though...

Please could anyone explain what's wrong and / or is there a more quicker way to copy data from a table to another?


Note i woul have as a final goal to get data from an AS400 database by ODBC, manage it, and put it on SQL Server for a 'data mining' scope (eliminating the use of MS Access, not suited for FE-BE).

the procedure goes like this;


' Create a connection to the MS Access Database
Dim connectionToAccess As New OleDbConnection(DBConnectionAccString)
strsql = "SELECT * FROM [TABELLA]"
connectionToAccess.Open()
Dim DaAccess As New OleDbDataAdapter(strsql, connectionToAccess)

Dim DsAccess As New DataSet("ACCESS")
DaAccess.FillSchema(DsAccess, SchemaType.Source, "Tabella")
DaAccess.Fill(DsAccess, "Tabella")

' Create a connection to the SQL Database
Dim connectionToSQL As New SqlConnection(DBConnectionSQLString)
connectionToSQL.Open()
Dim DaSQL As New SqlDataAdapter(strsql, connectionToSQL)

Dim DsSQL As New DataSet("SQL")
DaSQL.FillSchema(DsSQL, SchemaType.Source, "Tabella")
DaSQL.Fill(DsAccess, "Tabella")

DaSQL.Update(DsSQL, "Tabella")

Note I tried also the following, withou a result;


DsSQL = DsAccess.Copy
DaSQL.Update(DsSQL, "Tabella")

Please is there someone who could respond !!???

View 6 Replies View Related

Suspect Database Attempting To Populate Large Table

May 2, 2007

I am trying to load in to a new application's database to see if my load procedures will be able to handle the volume and how long I should plan on when I perform our cut over for production. Unfortunately, trying to copy 5.4M rows from one staging table into a production processing table consistently leaves the database in a suspect status, usually stating to perform some type of disk consistency check utility. It happens time after time, is there anything obvious that I could look at to see why this is happening?

View 3 Replies View Related

SSIS: Populate Database From A Space Delimited File

Aug 9, 2007

The problem is that I have (for example) following data

AAAA AA ALH
B BBB MIL
CCCCCC CAC Q
D D P

in space delimited file and i want to populate a database using SSIS and it is not working. Any suggestions will be appreciated.


P.S. the only way to recognize colums is through spaces b/w the data.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved