sql server - SQL 2003 Error - System.ArgumentException: Column 'Quantity' does not belong to table 1 -


i'm using visual studio build piece of software connects mssql 2003 server. trying pull data table in order use in stored procedure , receiving following error.

system.argumentexception: column 'quantity' not belong table tms_campaign.

i have double checked column name spelt correctly , case correct. have tried iisreset.exe , rebooting machine @ recommendation other post.

sub sendmail()     dim sql string     dim ods new data.dataset     dim odt new data.datatable     dim serverid integer = getserverid()       sql = "exec sp_check " & serverid     odt = getrs(sql)      if odt.rows.count = 0         'if there no item set status = ready , exit         sql = "update tms_server" & vbcrlf &                  "set statusid = 3," & vbcrlf &                  "statusdatetime = getdate()" & vbcrlf &                  "where sid = " & serverid         addlinetolog("no schedule - " & now)         application.doevents()         wait(5)     else         'set ids         g.mid = odt.rows(0)("mid")         g.cid = odt.rows(0)("cid")         g.lid = odt.rows(0)("lid")         g.sfid = odt.rows(0)("sfid")         g.lastid = odt.rows(0)("lastid")         g.batchsize = odt.rows(0)("batchsize")         g.quantity = odt.rows(0)("quantity")          'get list          executesql("sp_getorderid_v4 " & g.lid & "," & g.mid & "," & g.quantity) 

edit - code comment:

create proc sp_checkforcampaign  @serverid int   select top 1 mid, l.lid, l.akid, l.aklevel, c.cid, c.warm, sfid, launchdatetime, lastid, batchsize, batchinterval  tms_mailings m  inner join tms_campaign c on m.cid = c.cid  inner join tms_server s on m.sid = s.sid  inner join tms_list l on m.lid = l.lid  launchdatetime < getdate()  , m.sid = @serverid  , m.statusid in (1,2) -- scheduled, mailing  order launchdatetime  go 


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -