SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    ADO Question (RE: Database Testing)

    User Crunk John (ext3jpc) (ext3jpc@ups.com.nospam) posted:

    I have not noticed a speed gain in using ADO, but there is added
    functionality and I can directly access the record set and bypass using the
    array that is involved in using the SQL functions in Robot.

    John


  2. #2
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Martin, Toby (Toby.Martin@Compaq.com.nospam) posted:

    what is ADO - cant find anything in help files refering to this

    Thanks

    Toby Martin


  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Steve Gray (sgray@BridgeMedical.com.nospam) posted:
    http://www.microsoft.com/data/ado/


  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User anna a (anp19742000@yahoo.com.nospam) posted:

    Does Robot support MSDE (Microsoft Database Engine)?
    --- "TRIPONI, VIRGINIA" <VIRGINIA.TRIPONI@adastar.com>
    wrote:
    leave-sqa-suite-users-9233366V@lyris.dundee.net


    __________________________________________________

  5. #5
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Steve Gray (sgray@BridgeMedical.com.nospam) posted:

    MSDE is nothing more than a very small version of SQL server that is freely
    distributable. It is functionally the same as SQL Server, so, yes, Robot's
    SQL* functions will work on a database hosted by MSDE.

    Steve


  6. #6
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Crunk John (ext3jpc) (David_Goldstein@cch-lis.com.nospam) posted:
    Can someone post a commented sample for a script using ADO for me to work from?
    Is there any info on the Rational Users site about ADO? I'd like to give it a
    try.

    Thanks,
    Dave
    "Crunk John (ext3jpc)" <ext3jpc@ups.com> on 08/20/2001 04:37:29 PM

    Please respond to "SQA Suite Team Test Users" <sqa-suite-users@lyris.dundee.net>

    To: "SQA Suite Team Test Users" <sqa-suite-users@lyris.dundee.net>
    cc: (bcc: David Goldstein)

    Subject: RE: ADO Question (RE: Database Testing)
    I have not noticed a speed gain in using ADO, but there is added
    functionality and I can directly access the record set and bypass using the
    array that is involved in using the SQL functions in Robot.

    John


  7. #7
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Crunk John (ext3jpc) (MMcNaughton@STSSystems.com.nospam) posted:

    You'll need to know about DSNs... What type of db do you have? If it's an
    Access DB you'll have to know the version of the jet engine. This is just a
    small start so all it does is connect to db1.mdb and create a recordset of
    with the results of "Select * from Screen", then displays all the
    screen_id's from the table Screen (Do While re.EOF <> True). But it's
    something easy to play with.

    Let us know if you get stuck.

    '================================================= ==

    Dim Connect as Object
    Dim rs As Object

    Set Connect = CreateObject("ADODB.Connection")

    With Connect
    'Using this method assumes you've set up a DSN
    'SQL Server
    '.ConnectionString = "driver={SQL Server}; server=MEW_QA; uid=sa;
    pwd=password; database=qas_07"
    'Oracle
    '.ConnectionString = "DSN=QAMV01; UID=QAMV01; PWD=QAMV01"
    'Access
    .Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=u:\db1.mdb"

    End With

    Set rs = CreateObject("ADODB.Recordset")
    Set rs.ActiveConnection = Connect

    rs.Open "Select * from Screen"

    rs.MoveFirst

    Do While rs.EOF <> True
    MsgBox rs.Fields("screen_id")
    rs.MoveNext
    Loop

    rs.Close
    Connect.Close

    Max



  8. #8
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Crunk John (ext3jpc) (CAntonio@ADESA.com.nospam) posted:

    get these property id value from the object library I'm using
    various areas of the OBJ. LIB. here

    CONST adSchemaColumns=4
    CONST adStateOpen=1
    CONST adOpenDynamic=2
    CONST adLockoptimistic=3
    CONST adCmdTable=2
    CONST adschemaprovidertype=22


    Dim Result As Integer
    DIM OConnection as object
    Dim ORecordset as object
    DIM ODataType as object
    Dim Connection as string
    Dim sCurrentTable as string
    Dim sNewTable as string
    Dim countRecords, DBFields, recs
    Dim FieldItems as long

    'create your object variable
    SET OConnection=createobject("ADODB.CONNECTION")
    SET ORecordset=createobject("ADODB.Recordset")

    **********choose a type of connection depending on what it is your trying to
    accomplish connection can be tricky at first but once u get it ... it's
    cake ****************************
    'connection = "Provider=sqloledb;" & _
    '"Data Source=srv;Initial Catalog=pubs;User Id=sa;Password=; "

    connection = "Driver={SQL SERVER};" & _
    "Server=TEST5;uid=testa;pwd=pasword if any; database=db to connect to"

    'OConnection.connectionstring = "Driver={SQL SERVER};" & _
    ' "Server=TEST5;uid=testa;pwd=pasword; database=db to connect to xxx"


    'SET test=createobject("ADODB.COMMAND")




    'OConnection.connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    '"Data Source= c:\Program Files\Microsoft Office\" & _
    '"Office\Samples\Northwind.mdb;"

    *** Explanatory******************
    OConnection.open connection

    'IF OConnection.state=adStateOpen THEN
    ' ORecordset.open "SELECT * FROM organization", OConnection,
    adOpenDynamic, adLockOptimistic, adCmdTable
    'ELSE
    ' msgbox "Connection could not be made."
    ' Exit sub
    'END IF

    'ORecordset.movelast
    'countrecords=ORecordset.Recordcount
    'DBFields=ORecordset.Fields.Count
    'ORecordset.movefirst

    *******************extract data and do something with it in this case I just
    wanna view it in notepad
    'StartApplication "C:\WINNT\NOTEPAD.EXE"
    'Window SetContext, "Caption=Untitled - Notepad", ""

    'InputKeys "Number of records = " & countRecords & " - Number of Fields =
    " & dbfields & CHR(13) & Chr(13)

    'For recs=1 to countrecords
    ' for FieldItems=0 to DBFields-1
    ' InputKeys ORecordset.Fields(FieldItems).Value & CHR(9)
    ' Next
    ' InputKeys CHR(13)
    ' ORecordset.MoveNext
    'Next


    ************************************************** **************************
    ********************

  9. #9
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Crunk John (ext3jpc) (ext3jpc@ups.com.nospam) posted:

    Look in MSDN, it is there and in the Archives of this group.

    John


  10. #10
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: ADO Question (RE: Database Testing)

    User Crunk John (ext3jpc) (David_Goldstein@cch-lis.com.nospam) posted:
    Thanks, Max. Your code was nice and easy for and ADO beginner like me to
    follow. I was able to edit it easily and merge it into my script. The speed
    improvement over the ODBC version of the script is excellent. Below is my
    script with the ADO code in it. (For those reading my posts the last week or
    so, this is the script I've been writing about.) Thanks agaian for the starter
    script, Max.

    - Dave


    Sub Main
    Dim Result As Integer
    Dim FileName As String
    Dim LineText As String
    Dim Query As String
    Dim Connect as Object
    Dim rs As Object

    Open "c:\psparq\dir3.txt" For Input As #1

    Do While Not Eof(1)
    Line Input #1, FileName
    Open "c:\psparq\"+FileName+".txt" For Input As #2

    Set Connect = CreateObject("ADODB.Connection")

    With Connect
    .ConnectionString = "DSN=PSPARQ; UID=SPARQ; PWD=SPARQSPARQ"
    End With

    Connect.open

    Set rs = CreateObject("ADODB.Recordset")
    Set rs.ActiveConnection = Connect

    Do While Not Eof(2)
    LineText=Input(8,#2)
    Query = "SELECT up FROM trademark_and_status WHERE sn='"
    +LineText+"'"
    rs.Open Query
    rs.MoveFirst
    If rs.Fields("up") > "20010727" Then
    Open "c:\psparq\"+FileName+".csv" For Append As #3
    Print #3, LineText+","+rs.Fields("up")
    Close #3
    End If
    LineText=Input(1,#2)
    rs.Close
    Loop

    Close #2
    Connect.Close

    Loop
    End Sub

    MMcNaughton@STSSystems.com on 08/21/2001 08:42:16 AM

    Please respond to "SQA Suite Team Test Users" <sqa-suite-users@lyris.dundee.net>

    To: "SQA Suite Team Test Users" <sqa-suite-users@lyris.dundee.net>
    cc: (bcc: David Goldstein)

    Subject: RE: ADO Question (RE: Database Testing)
    You'll need to know about DSNs... What type of db do you have? If it's an
    Access DB you'll have to know the version of the jet engine. This is just a
    small start so all it does is connect to db1.mdb and create a recordset of
    with the results of "Select * from Screen", then displays all the
    screen_id's from the table Screen (Do While re.EOF <> True). But it's
    something easy to play with.

    Let us know if you get stuck.

    '================================================= ==

    Dim Connect as Object
    Dim rs As Object

    Set Connect = CreateObject("ADODB.Connection")

    With Connect
    'Using this method assumes you've set up a DSN
    'SQL Server
    '.ConnectionString = "driver={SQL Server}; server=MEW_QA; uid=sa;
    pwd=password; database=qas_07"
    'Oracle
    '.ConnectionString = "DSN=QAMV01; UID=QAMV01; PWD=QAMV01"
    'Access
    .Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=u:\db1.mdb"

    End With

    Set rs = CreateObject("ADODB.Recordset")
    Set rs.ActiveConnection = Connect

    rs.Open "Select * from Screen"

    rs.MoveFirst

    Do While rs.EOF <> True
    MsgBox rs.Fields("screen_id")
    rs.MoveNext
    Loop

    rs.Close
    Connect.Close

    Max



 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 13.64%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:42 AM.

Copyright BetaSoft Inc.