By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,092 Members | 1,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,092 IT Pros & Developers. It's quick & easy.

Same problem of transfer of some access data to another access database

P: 11
how can we transfer data from one access database to another databse . the table name is same for both the database . in one table some records are there (rs say e.g.) now another table has say rs+10 records . now i have to pass there 10 values to another table with same name . can anyone help me with this. i m usinf DAO
. i wrote some codes in dao. i created a function : AddTableField

i m writing it in module so that it can be access from anywhere in the program
this is the code

Sub AddTableField(ptdfTableDef As DAO.TableDef, pstrFieldName As String, pintDatatype As Integer, Optional pintSize As Integer, Optional pblnFixedLength As Boolean, Optional pblnAutoIncrement As Boolean, Optional pblnAllowZeroLength As Boolean, Optional pblnRequired As Boolean, Optional pstrValidationText As String, Optional pstrValidationRule As String, Optional pvarDefaultValue As Variant)
Dim fldX As DAO.Field
Dim intSize As Integer

Set fldX = ptdfTableDef.CreateField()

fldX.OrdinalPosition = ptdfTableDef.Fields.Count

fldX.Name = pstrFieldName
fldX.Type = pintDatatype

If Not IsMissing(pblnAllowZeroLength) Then
If pintDatatype = dbText And pintSize > 0 Then
fldX.Size = pintSize
Else
fldX.Size = GetFieldSize(pintDatatype)
End If
Else
fldX.Size = GetFieldSize(pintDatatype)
End If

If fldX.Type = dbLong Then
If pblnAutoIncrement = True Then
fldX.Attributes = fldX.Attributes Or dbAutoIncrField
End If
End If

If fldX.Type = dbText Or fldX.Type = dbMemo Then
fldX.AllowZeroLength = True
End If

If Not IsMissing(pblnRequired) Then
fldX.Required = pblnRequired
End If

If Not IsMissing(pstrValidationText) Then
fldX.ValidationText = pstrValidationText
End If

If Not IsMissing(pstrValidationRule) Then
fldX.ValidationRule = pstrValidationRule
End If

If Not IsMissing(pvarDefaultValue) Then
fldX.DefaultValue = pvarDefaultValue
End If

ptdfTableDef.Fields.Append fldX

End Sub
.

still i cannot get the transfer done
Mar 23 '07 #1
Share this Question
Share on Google+
2 Replies


vijaydiwakar
100+
P: 579
how can we transfer data from one access database to another databse . the table name is same for both the database . in one table some records are there (rs say e.g.) now another table has say rs+10 records . now i have to pass there 10 values to another table with same name . can anyone help me with this. i m usinf DAO
. i wrote some codes in dao. i created a function : AddTableField

i m writing it in module so that it can be access from anywhere in the program
this is the code

Sub AddTableField(ptdfTableDef As DAO.TableDef, pstrFieldName As String, pintDatatype As Integer, Optional pintSize As Integer, Optional pblnFixedLength As Boolean, Optional pblnAutoIncrement As Boolean, Optional pblnAllowZeroLength As Boolean, Optional pblnRequired As Boolean, Optional pstrValidationText As String, Optional pstrValidationRule As String, Optional pvarDefaultValue As Variant)
Dim fldX As DAO.Field
Dim intSize As Integer

Set fldX = ptdfTableDef.CreateField()

fldX.OrdinalPosition = ptdfTableDef.Fields.Count

fldX.Name = pstrFieldName
fldX.Type = pintDatatype

If Not IsMissing(pblnAllowZeroLength) Then
If pintDatatype = dbText And pintSize > 0 Then
fldX.Size = pintSize
Else
fldX.Size = GetFieldSize(pintDatatype)
End If
Else
fldX.Size = GetFieldSize(pintDatatype)
End If

If fldX.Type = dbLong Then
If pblnAutoIncrement = True Then
fldX.Attributes = fldX.Attributes Or dbAutoIncrField
End If
End If

If fldX.Type = dbText Or fldX.Type = dbMemo Then
fldX.AllowZeroLength = True
End If

If Not IsMissing(pblnRequired) Then
fldX.Required = pblnRequired
End If

If Not IsMissing(pstrValidationText) Then
fldX.ValidationText = pstrValidationText
End If

If Not IsMissing(pstrValidationRule) Then
fldX.ValidationRule = pstrValidationRule
End If

If Not IsMissing(pvarDefaultValue) Then
fldX.DefaultValue = pvarDefaultValue
End If

ptdfTableDef.Fields.Append fldX

End Sub
.

still i cannot get the transfer done
Dear try to use ADO
Mar 23 '07 #2

P: 2
Can anybody make a programme to transfer data from one programme to another different programmes in c++ or dotnet or in java or in c or in cabol or in c-sharp

And retreive the same from other programmes as results

Data should be feed of more than 25,000 at one stroke in others different programmes.

send yr details at sanjaykumarnagar@gmail.com
call 9885292824
Dec 2 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.