Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Checkpoint
#1
Not Solved
Hi All,

I have a problem in database checkpoint. I know how to do a database checkpoint. But I don’t know how it integrates or put it with a web application.

As an example, when I want to check search value with database value, how can I do it?. How do I connect database checkpoint with my search result window or grid.

If any one knows about any idea, please let me know. Thanks

regards,
Amila
Reply
#2
Not Solved
A Database check would be dependant on what you need to check.... is it the number of records being returned or the actual field name values?

What database are you connecting to? for examples of connection strings see: http://www.connectionstrings.com/

I have a control file that the Parameters are passed from I'm connecting to three different databases depending which on is switched on the control file on my test box.

Code:
DBType=GetLocalParameter("profile.database")  
If DBType="Oracle" Then
  UID = GetLocalParameter("oracle.user")
  PWD = GetLocalParameter("oracle.password")
  SERVER= GetLocalParameter("oracle.servername")
  set conn=Createobject("ADODB.Connection")
  Srvname="DRIVER={Microsoft ODBC for Oracle};UID="&UID&";PWD="&PWD&";SERVER="&SERVER&";"
  conn.open Srvname
Elseif DBType="sqlserver" Then
  UID = GetLocalParameter("sqlserver.user")
  PWD = GetLocalParameter("sqlserver.password")
  SERVER= GetLocalParameter("sqlserver.servername")
  DATABASE= GetLocalParameter("sqlserver.servername")
  DATASOURCE=GetLocalParameter("sqlserver.host")
  PORTNUM=GetLocalParameter("sqlserver.port")
  set conn=Createobject("ADODB.Connection")
  Srvname= "PROVIDER=SQLOLEDB;DATA SOURCE="&DATASOURCE&","&PORTNUM&";UID="&UID & ";PWD="&PWD&";DATABASE="
  conn.open Srvname
Elseif DBType="isam" Then
DATASOURCE=GetLocalParameter("isam.datasource")
set conn=Createobject("ADODB.Connection")
    Srvname="Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq="&DATASOURCE&"; "
msgbox(Srvname)
conn.open Srvname
End If

Once you have opened the connection to the server all you need to do is run the SQL query:

Code:
Set Rec = CreateObject("ADODB.Recordset")
SQL= ""&sqlstring&" "
Rec.open SQL ,conn


for me I'm just verifying the number of records being returned so my "sqlstring" is being built in another process and as it only returns the count you can put the count in a variable as below

Code:
Total_Count=rec(0)


Then you can do a compare with you database count and the number of records displayed on your Application..
Reply
#3
Not Solved
Thanks,

I wrote a function for database connection and select query, but i can't retrieve data from the function. if u know the way please let me know... thanks.


my function



Code:
Function ConnectDatabase()
dim Cnxn,strCnxn
dim rsCus,strSQL

    set Cnxn = CreateObject("ADODB.Connection")
    set rsCus = CreateObject("ADODB.RecordSet")

strCnxn ="DRIVER={Microsoft ODBC for Oracle};UID=amilar12;PWD=mypass;SERVER=TEST_DB_DOMAIN.ORG"
    
    Cnxn.Open strCnxn
    msgbox "connect"


strSQL ="select  *  FROM aa_mgr.jms_messages "

rsCus.Open strSQL,Cnxn

end function


Regards,
Amila
Reply
#4
Not Solved
when you call the function you need to what variable that you are going to retrieve:

Code:
<VariableName>=<FunctionName>

my code is like this:

Code:
RecordNumbers = get_record_counts (PartialName, PartialNameCounty, PartialNameCity, IncludeAbbrev,Search_Level, Show_Full, Search_Method)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Database CheckPoint Luanna 1 1,921 01-21-2014, 02:27 PM
Last Post: Luanna
  How do I create a database checkpoint to validate data from xls NewAtQTP 0 2,531 02-25-2011, 05:18 PM
Last Post: NewAtQTP
Wink standard checkpoint and text checkpoint kiran10_rm 1 5,354 11-18-2010, 05:16 AM
Last Post: nandu
  fullscreen and bitmap checkpoint error "Cannot create bitmap checkpoint" meuline 2 4,712 12-10-2009, 09:17 PM
Last Post: meuline
  Checkpoint problems: Checkpoint starts before web page is loaded & therefore fails! IdontGetIt 1 3,917 11-20-2009, 11:45 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)