Sounds good but I am in the uk.... It would be a lengthy summit...
Â
________________________________
From: Kunal Ganguly <kunal_vantage@...>
To: vantage@yahoogroups.com
Sent: Thu, 14 January, 2010 18:05:10
Subject: Re: [Vantage] issue with whereclause
Â
Brychan,
I figured it out. The tablename as a key for the hashtable is what I was missing! Thanks a ton for your help!! If you are ever in Houston, let me know. We will have a beer summit over the idiosyncrasies of programming for vantage.
Thanks,
Kunal
____________ _________ _________ __
From: Brychan Williams <brychanwilliams@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, January 14, 2010 11:33:42 AM
Subject: Re: [Vantage] issue with whereclause
Hi, They related to table names in the dataset being used. In my example I am looking at the project dataset which has project and projecttask tables which I am filtering/selecting on. Maybe in your example you just need one whereclause for Quotedtl but I am guessing. Use to the BLT to test exactly what inputs are required.
____________ _________ _________ __
From: Kunal Ganguly <kunal_vantage@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, 14 January, 2010 17:25:12
Subject: Re: [Vantage] issue with whereclause
Brychan,
Thanks, that has been a huge help in understand how the process works. Unfortunately, I am getting the same result of the entire quotedtl table instead of the rows that I want.
In htProjectWhere. Add("Project" , ProjectwhereClause) and htProjectWhere. Add("ProjectTask ", PersonwhereClause)
are "project" and "Projecttask" arbitary names you selected or do they translate to something?
Thanks,
Kunal
____________ _________ _________ __
From: Brychan Williams <brychanwilliams@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, January 14, 2010 8:21:04 AM
Subject: Re: [Vantage] issue with whereclause
Sorry I haven't got much time on my hands, this is code lifted out of a customisation, it should give you an idea,.
Imports System.collections
dim ProjectwhereClause as string
Dim PersonwhereClause as string
ProjectwhereClause = "Character04 = 'Open'"
PersonWhereClause = "PersonID = 'Bobs'"
Dim adapterName As String = "ProjectAdapter"
'// Name of the Adapter
Dim dtMyProjects As DataTable
'// Initialize DataTable object
'// ** Create SearchOptions object **
Dim opts As SearchOptions = New SearchOptions( SearchMode. AutoSearch)
'// ** call method, returns DataSet **
Dim dsMyProjects As DataSet
'// ** Create Hashtable to hold Where Clauses
Dim htProjectWhere As Hashtable = New Hashtable()
htProjectWhere. Add("Project" , ProjectwhereClause)
htProjectWhere. Add("ProjectTask ", PersonwhereClause)
opts = SearchOptions. CreateRuntimeSea rch(htProjectWhe re, DataSetMode. RowsDataSet)
Dim oProjectRes As Object = ProcessCaller. LaunchSearch( PersonForm, adapterName, opts)
If (TypeOf( oProjectRes) Is DataSet) Then
dsMyProjects = oProjectRes
'// ** check to see if table exists in DataSet, it it does bind grid to it **
If (dsMyProjects. Tables.Contains( "ProjectTask" )) Then
'// ** pull out DataTable **
dtMyProjects = dsMyProjects. Tables("Projectt ask")
ugdEpiCurrenttasks. datasource = dtMyProjects
End if
End if
____________ _________ _________ __
From: Kunal Ganguly <kunal_vantage@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, 14 January, 2010 13:52:28
Subject: Re: [Vantage] issue with whereclause
Brychan,
Can you show me what you by a hash statement? I don't believe I am familiar with those.
Thanks,
Kunal
____________ _________ _________ __
From: Brychan Williams <brychanwilliams@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, January 14, 2010 6:09:58 AM
Subject: Re: [Vantage] issue with whereclause
Hi,
Not in the office at the moment, believe you need to use a hash statement to pass the whereclause.
____________ _________ _________ __
From: Kunal Ganguly <kunal_vantage@ yahoo.com>
To: Vantage Yahoo Group <vantage@yahoogroup s .com>
Sent: Wed, 13 January, 2010 21:59:43
Subject: [Vantage] issue with whereclause
Dim myVA As QuoteDtlSearchAdapt er = New QuoteDtlSearchAdapt er(PartAdvisorFo rm)
myVA.BOConnect( )
Dim MorePages As Boolean
Dim opts As SearchOptions = New SearchOptions( SearchMode. AutoSearch)
opts.NamedSearch. WhereClauses. Add("partnum" ,"004488" )
Dim myDS As Data.DataSet = myVA.GetList( opts, false)
ugdASHQuot.dataSour ce = myDS
myVA.Dispose( )
myVA is the adapter and mdDS is the dataset whose contents will be passed to a gridview ugdASHQuot on the form.
Instead of only getting quotes with 004488 as a part number, I am getting ALL quotes in the system regardless of part number. Hence I believe the line "opts.NamedSearch. WhereClauses. Add("partnum" ,"004488" )" is the issue here. Does anyone know what the correct statement should be?
Thanks,
Kunal
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Â
________________________________
From: Kunal Ganguly <kunal_vantage@...>
To: vantage@yahoogroups.com
Sent: Thu, 14 January, 2010 18:05:10
Subject: Re: [Vantage] issue with whereclause
Â
Brychan,
I figured it out. The tablename as a key for the hashtable is what I was missing! Thanks a ton for your help!! If you are ever in Houston, let me know. We will have a beer summit over the idiosyncrasies of programming for vantage.
Thanks,
Kunal
____________ _________ _________ __
From: Brychan Williams <brychanwilliams@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, January 14, 2010 11:33:42 AM
Subject: Re: [Vantage] issue with whereclause
Hi, They related to table names in the dataset being used. In my example I am looking at the project dataset which has project and projecttask tables which I am filtering/selecting on. Maybe in your example you just need one whereclause for Quotedtl but I am guessing. Use to the BLT to test exactly what inputs are required.
____________ _________ _________ __
From: Kunal Ganguly <kunal_vantage@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, 14 January, 2010 17:25:12
Subject: Re: [Vantage] issue with whereclause
Brychan,
Thanks, that has been a huge help in understand how the process works. Unfortunately, I am getting the same result of the entire quotedtl table instead of the rows that I want.
In htProjectWhere. Add("Project" , ProjectwhereClause) and htProjectWhere. Add("ProjectTask ", PersonwhereClause)
are "project" and "Projecttask" arbitary names you selected or do they translate to something?
Thanks,
Kunal
____________ _________ _________ __
From: Brychan Williams <brychanwilliams@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, January 14, 2010 8:21:04 AM
Subject: Re: [Vantage] issue with whereclause
Sorry I haven't got much time on my hands, this is code lifted out of a customisation, it should give you an idea,.
Imports System.collections
dim ProjectwhereClause as string
Dim PersonwhereClause as string
ProjectwhereClause = "Character04 = 'Open'"
PersonWhereClause = "PersonID = 'Bobs'"
Dim adapterName As String = "ProjectAdapter"
'// Name of the Adapter
Dim dtMyProjects As DataTable
'// Initialize DataTable object
'// ** Create SearchOptions object **
Dim opts As SearchOptions = New SearchOptions( SearchMode. AutoSearch)
'// ** call method, returns DataSet **
Dim dsMyProjects As DataSet
'// ** Create Hashtable to hold Where Clauses
Dim htProjectWhere As Hashtable = New Hashtable()
htProjectWhere. Add("Project" , ProjectwhereClause)
htProjectWhere. Add("ProjectTask ", PersonwhereClause)
opts = SearchOptions. CreateRuntimeSea rch(htProjectWhe re, DataSetMode. RowsDataSet)
Dim oProjectRes As Object = ProcessCaller. LaunchSearch( PersonForm, adapterName, opts)
If (TypeOf( oProjectRes) Is DataSet) Then
dsMyProjects = oProjectRes
'// ** check to see if table exists in DataSet, it it does bind grid to it **
If (dsMyProjects. Tables.Contains( "ProjectTask" )) Then
'// ** pull out DataTable **
dtMyProjects = dsMyProjects. Tables("Projectt ask")
ugdEpiCurrenttasks. datasource = dtMyProjects
End if
End if
____________ _________ _________ __
From: Kunal Ganguly <kunal_vantage@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, 14 January, 2010 13:52:28
Subject: Re: [Vantage] issue with whereclause
Brychan,
Can you show me what you by a hash statement? I don't believe I am familiar with those.
Thanks,
Kunal
____________ _________ _________ __
From: Brychan Williams <brychanwilliams@ yahoo.com>
To: vantage@yahoogroups .com
Sent: Thu, January 14, 2010 6:09:58 AM
Subject: Re: [Vantage] issue with whereclause
Hi,
Not in the office at the moment, believe you need to use a hash statement to pass the whereclause.
____________ _________ _________ __
From: Kunal Ganguly <kunal_vantage@ yahoo.com>
To: Vantage Yahoo Group <vantage@yahoogroup s .com>
Sent: Wed, 13 January, 2010 21:59:43
Subject: [Vantage] issue with whereclause
Dim myVA As QuoteDtlSearchAdapt er = New QuoteDtlSearchAdapt er(PartAdvisorFo rm)
myVA.BOConnect( )
Dim MorePages As Boolean
Dim opts As SearchOptions = New SearchOptions( SearchMode. AutoSearch)
opts.NamedSearch. WhereClauses. Add("partnum" ,"004488" )
Dim myDS As Data.DataSet = myVA.GetList( opts, false)
ugdASHQuot.dataSour ce = myDS
myVA.Dispose( )
myVA is the adapter and mdDS is the dataset whose contents will be passed to a gridview ugdASHQuot on the form.
Instead of only getting quotes with 004488 as a part number, I am getting ALL quotes in the system regardless of part number. Hence I believe the line "opts.NamedSearch. WhereClauses. Add("partnum" ,"004488" )" is the issue here. Does anyone know what the correct statement should be?
Thanks,
Kunal
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]