Click here to Skip to main content
15,896,201 members
Home / Discussions / Database
   

Database

 
QuestionBLOBs: How to insert/store and get/retrieve an object? Pin
Rafferty Uy5-Dec-04 13:58
Rafferty Uy5-Dec-04 13:58 
AnswerRe: BLOBs: How to insert/store an object? Pin
Steve S6-Dec-04 1:32
Steve S6-Dec-04 1:32 
GeneralRe: BLOBs: How to insert/store an object? Pin
Rafferty Uy6-Dec-04 13:18
Rafferty Uy6-Dec-04 13:18 
GeneralRe: BLOBs: How to insert/store an object? Pin
Steve S7-Dec-04 1:30
Steve S7-Dec-04 1:30 
AnswerRe: BLOBs: How to insert/store and get/retrieve an object? Pin
Rafferty Uy8-Dec-04 17:01
Rafferty Uy8-Dec-04 17:01 
GeneralADO .NET and Excel... :( :( HELP!! Pin
fadee4-Dec-04 10:15
fadee4-Dec-04 10:15 
GeneralString array to Oracle procedure from VB.Net Pin
Santhimurthy3-Dec-04 22:05
Santhimurthy3-Dec-04 22:05 
QuestionCan anyone help me with this one? Pin
Suresh Prasad3-Dec-04 10:40
Suresh Prasad3-Dec-04 10:40 
I am trying to import records in a Access Database. Each time I run this code, the records are added to my database, BUT it adds to the existing database. Example if I run code once, it imports 100 records, the next time I run the code again, it imports another 100 records. Now my Access database has 200 records, when it should only have 100 records. Can anyone help me on this? Thanks

Private Sub ImportToAccess()

Dim Con1 As New ADODB.Connection
Dim Con2 As New ADODB.Connection
Dim mySQL1 As String
Dim mySQL2 As String
Dim myDSN As String
Dim mySET As String
Dim tmpTable As String

'Connection parameters for Source Database
myDSN = "DSN=Springbrook1;UID=suresh;PWD=nissan;"
mySET = "set schema 'pub'"
mySQL2 = "select * from customer"

'Open Source Database
Con2.Open myDSN
Con2.Execute (mySET)

'Open Destination Database
Con1.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Temp\VB Sample Codes\mcwd\Connect Program\test1.mdb;" & _
"Jet OLEDB:Engine Type=5;"

'WORKS BUT CREATES DUPLICATE RECORDS
'mySQL1 = "INSERT INTO [C:\Temp\VB Sample Codes\mcwd\Connect Program\test1.mdb].[tblCustomer] SELECT Cust_No, First_Name FROM [odbc;DSN=Springbrook1;UID=suresh;PWD=nissan;].[Customer]"

Con1.Execute mySQL1

Con1.Close
Con2.Close
Set Con1 = Nothing
Set Con2 = Nothing

End Sub
AnswerRe: Can anyone help me with this one? Pin
Mike Ellison3-Dec-04 11:13
Mike Ellison3-Dec-04 11:13 
GeneralRe: Can anyone help me with this one? Pin
Suresh Prasad3-Dec-04 11:29
Suresh Prasad3-Dec-04 11:29 
GeneralRe: Can anyone help me with this one? Pin
Mike Ellison3-Dec-04 11:48
Mike Ellison3-Dec-04 11:48 
GeneralRe: Can anyone help me with this one? Pin
Suresh Prasad3-Dec-04 11:57
Suresh Prasad3-Dec-04 11:57 
GeneralUploading Large numbers of records Pin
mjackson113-Dec-04 8:07
mjackson113-Dec-04 8:07 
GeneralRe: Uploading Large numbers of records Pin
Alex Korchemniy4-Dec-04 16:56
Alex Korchemniy4-Dec-04 16:56 
GeneralRe: Uploading Large numbers of records Pin
mjackson118-Dec-04 9:42
mjackson118-Dec-04 9:42 
GeneralADO.NET columns are magic numbers.. Pin
giorgos_gr3-Dec-04 5:09
giorgos_gr3-Dec-04 5:09 
GeneralSQL Tree Hierarchy Problem Pin
Dirk Kok2-Dec-04 22:24
sussDirk Kok2-Dec-04 22:24 
GeneralRe: SQL Tree Hierarchy Problem Pin
Michael Potter3-Dec-04 4:34
Michael Potter3-Dec-04 4:34 
GeneralRe: SQL Tree Hierarchy Problem Pin
Chris Meech3-Dec-04 6:44
Chris Meech3-Dec-04 6:44 
GeneralStored Proc and SqlDataAdapter Pin
ccosser2-Dec-04 22:03
ccosser2-Dec-04 22:03 
GeneralAttaching a database to MSDE Pin
mattie202-Dec-04 20:31
mattie202-Dec-04 20:31 
GeneralNested Transaction with SQL Server Pin
Wouter van Eck2-Dec-04 5:21
Wouter van Eck2-Dec-04 5:21 
QuestionHow can i avaoid negative values in SQL? Pin
john kuruvila2-Dec-04 5:14
john kuruvila2-Dec-04 5:14 
AnswerRe: How can i avaoid negative values in SQL? Pin
Colin Angus Mackay2-Dec-04 6:42
Colin Angus Mackay2-Dec-04 6:42 
GeneralRe: How can i avaoid negative values in SQL? Pin
john kuruvila2-Dec-04 7:30
john kuruvila2-Dec-04 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.