Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Loop through Query in vb.net

Author  Topic 

saidev
Posting Yak Master

101 Posts

Posted - 2006-07-21 : 19:17:58
Hi Guys,

I have a query that i need to go through the loop. can you guys help me how to put loop for this in vb.net.


If Me.rdounwired.Checked = True And Me.rdoallinv.Checked = True Then
sql = "SELECT DISTINCT fkGroup, fkAgency, fkAdvertiser FROM tblSpot WHERE fkInvoice IS NULL AND dateScheduled <= '" & Me.ddbmonth.SelectedValue & "' AND fkContractType = 'UNWIRED'"
Else
If Me.txtsubgroup.Text = "" Then
sql = "SELECT DISTINCT fkGroup, fkAgency, fkAdvertiser FROM tblContract WHERE fkGroup = '" & Me.txtgroup.Text & "' AND fkContractType = 'UNWIRED'"
Else
sql = "SELECT DISTINCT fkGroup, fkSubGroup, fkAgency, fkAdvertiser FROM tblContract WHERE fkGroup = '" & Me.txtgroup.Text & "' AND fkSubGroup = '" & Me.txtsubgroup.Text & "' AND fkContractType = 'UNWIRED'"
End If
End If
dbfunctions.RunSQLQuery(CONNECTIONSTRING, sql)

Thanks

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-07-22 : 02:37:32
Can you provide with more information..???

What do you mean by looping ???

Chirag
Go to Top of Page
   

- Advertisement -