Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

duplicate records

hi,
i need query to list duplicate records.i am not going to give any crieteria .i need to list out all duplicate records in table.Please help me










Ganesh :)

Comments

  • bmiller1222bmiller1222 Member Posts: 107
    : hi,
    : i need query to list duplicate records.i am not going to give any crieteria .i need to list out all duplicate records in table.Please help me
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    : Ganesh :)
    :
    Really you should not have duplicate records, as with each table should be a primary key, which has unique values for every record. By the way, you have to specify criteria or you cannot create a query. Query what? I really think you should reconsider the way the database is set up, or how records are being stored are deleted from the database before continuing your project. There should never be 2 records exactly the same in a database, and if there is you have some major problems. Also, have you tried deleting the records. Be careful, as you probably will not be able to if you do have 2 or more identical records within the same table. Email me at bmiller1222@gmail.com and i'll help you out.
  • ganesh4uganesh4u Member Posts: 68
    hi,
    Thanks,
    what you say is correct.i know that,but this was question asked to me by an interviewer.so explain me.
    by the way do you know how to connect crystal report to a database which has a password.i am currently using database without password.so can you guide me in this regards.





    Thanks,
    Ganesh
    Ganesh :)

  • bmiller1222bmiller1222 Member Posts: 107
    : hi,
    : Thanks,
    : what you say is correct.i know that,but this was question asked to me by an interviewer.so explain me.
    : by the way do you know how to connect crystal report to a database which has a password.i am currently using database without password.so can you guide me in this regards.
    :
    :
    :
    :
    :
    : Thanks,
    : Ganesh
    : Ganesh :)
    :
    :
    well in the interview you should have said the same thing, it is what they wanted to hear. i have crystal reports but never use it, i like completely customizing my printouts and such, plus i just dont like it, but i would imagine you need to include the Jet OLEDB:Database Password argument, like this:

    Public Sub OpenConnection(ByRef cnConnection As ADODB.Connection, ByRef strPath As String)
    'declare variables
    Dim strConnect As String
    Dim strProvider As String

    'initialize variables
    strConnect = "Data Source=" & strPath & ";Jet OLEDB:Database Password=" & App.strDBPassword & ";"
    strProvider = "Microsoft.Jet.OLEDB.4.0;"

    'create object references
    cnConnection = New ADODB.Connection

    'open connection to database
    With cnConnection
    .ConnectionString = strConnect
    .CursorLocation = ADODB.CursorLocationEnum.adUseClient
    .Mode = ADODB.ConnectModeEnum.adModeReadWrite
    .Provider = strProvider
    .Open()
    End With

    End Sub

    ok, i will explain, to simpligy coding i use a sub to open connections, anyways, this is just an example of opening a password protected database. so, as you can see i inintialize the connection string with my data source and password (which is stored in a general module, do not do that, it was just for testing purposes). I do not know if this will help you for this problem.
Sign In or Register to comment.