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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajaaryan44
    New Member
    • Mar 2007
    • 11

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

    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(p tdfTableDef As DAO.TableDef, pstrFieldName As String, pintDatatype As Integer, Optional pintSize As Integer, Optional pblnFixedLength As Boolean, Optional pblnAutoIncreme nt As Boolean, Optional pblnAllowZeroLe ngth As Boolean, Optional pblnRequired As Boolean, Optional pstrValidationT ext As String, Optional pstrValidationR ule As String, Optional pvarDefaultValu e As Variant)
    Dim fldX As DAO.Field
    Dim intSize As Integer

    Set fldX = ptdfTableDef.Cr eateField()

    fldX.OrdinalPos ition = ptdfTableDef.Fi elds.Count

    fldX.Name = pstrFieldName
    fldX.Type = pintDatatype

    If Not IsMissing(pblnA llowZeroLength) Then
    If pintDatatype = dbText And pintSize > 0 Then
    fldX.Size = pintSize
    Else
    fldX.Size = GetFieldSize(pi ntDatatype)
    End If
    Else
    fldX.Size = GetFieldSize(pi ntDatatype)
    End If

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

    If fldX.Type = dbText Or fldX.Type = dbMemo Then
    fldX.AllowZeroL ength = True
    End If

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

    If Not IsMissing(pstrV alidationText) Then
    fldX.Validation Text = pstrValidationT ext
    End If

    If Not IsMissing(pstrV alidationRule) Then
    fldX.Validation Rule = pstrValidationR ule
    End If

    If Not IsMissing(pvarD efaultValue) Then
    fldX.DefaultVal ue = pvarDefaultValu e
    End If

    ptdfTableDef.Fi elds.Append fldX

    End Sub
    .

    still i cannot get the transfer done
  • vijaydiwakar
    Contributor
    • Feb 2007
    • 579

    #2
    Originally posted by rajaaryan44
    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(p tdfTableDef As DAO.TableDef, pstrFieldName As String, pintDatatype As Integer, Optional pintSize As Integer, Optional pblnFixedLength As Boolean, Optional pblnAutoIncreme nt As Boolean, Optional pblnAllowZeroLe ngth As Boolean, Optional pblnRequired As Boolean, Optional pstrValidationT ext As String, Optional pstrValidationR ule As String, Optional pvarDefaultValu e As Variant)
    Dim fldX As DAO.Field
    Dim intSize As Integer

    Set fldX = ptdfTableDef.Cr eateField()

    fldX.OrdinalPos ition = ptdfTableDef.Fi elds.Count

    fldX.Name = pstrFieldName
    fldX.Type = pintDatatype

    If Not IsMissing(pblnA llowZeroLength) Then
    If pintDatatype = dbText And pintSize > 0 Then
    fldX.Size = pintSize
    Else
    fldX.Size = GetFieldSize(pi ntDatatype)
    End If
    Else
    fldX.Size = GetFieldSize(pi ntDatatype)
    End If

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

    If fldX.Type = dbText Or fldX.Type = dbMemo Then
    fldX.AllowZeroL ength = True
    End If

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

    If Not IsMissing(pstrV alidationText) Then
    fldX.Validation Text = pstrValidationT ext
    End If

    If Not IsMissing(pstrV alidationRule) Then
    fldX.Validation Rule = pstrValidationR ule
    End If

    If Not IsMissing(pvarD efaultValue) Then
    fldX.DefaultVal ue = pvarDefaultValu e
    End If

    ptdfTableDef.Fi elds.Append fldX

    End Sub
    .

    still i cannot get the transfer done
    Dear try to use ADO

    Comment

    • misonimiss
      New Member
      • Dec 2010
      • 2

      #3
      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 sanjaykumarnaga r@gmail.com
      call 9885292824

      Comment

      Working...