🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #562

Re: selectie maken

#562
From: Wim Godden
Date: Wed, 31 Jan 2007 11:54
28 lines
1778 bytes
mheijdeman@amphia.nl wrote:
> Wat gaat hier fout?
>
> Set rs = olddb.OpenRecordset("SELECT naam, micronummer, categorie, " &
> dagdienst & " FROM " & tabelnaam & " where micronummer in " & "( " &
> strnaamcol & " )" & "and where " & dagdienst & "=" & "A")
>
> krijg namelijk runtime error 3075
>
>   

Je hebt 2 maal 'where' staan.
Correct is dus :

Set rs = olddb.OpenRecordset("SELECT naam, micronummer, categorie, " &
dagdienst & " FROM " & tabelnaam & " where micronummer in " & "( " &
strnaamcol & " )" & "and " & dagdienst & "=" & "A")



Je hebt ook de inhoud van de variabele dagdienst als kolomnaam staan... 
maar dat kan de bedoeling zijn uiteraard.


Mvg,

Wim Godden
FirstLink Networks
Technical Details
Message-ID: <1170244464.5484@bru-ix-srv240>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news.glorb.com!news.astraweb.com!router2.astraweb.com!not-for-mail
References: <1170239997.100617.266610@a75g2000cwd.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,cafa7d0bd8451b0e
X-Google-Attributes: gidfcea4,public
X-Google-Language: DUTCH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news.glorb.com!news.astraweb.com!router2.astraweb.com!not-for-mail
Date: Wed, 31 Jan 2007 12:54:20 +0100
From: Wim Godden <wim@godden.net>
Organization: FirstLink Networks
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: be.comp.programming
Subject: Re: selectie maken
References: <1170239997.100617.266610@a75g2000cwd.googlegroups.com>
In-Reply-To: <1170239997.100617.266610@a75g2000cwd.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <1170244464.5484@bru-ix-srv240>
X-EVOPath: unknown@brussels1.firstlinknetworks.com
Lines: 28
NNTP-Posting-Host: 9d10b31f.news.astraweb.com
X-Trace: DXC=8hoJJWF8kBbN4DY]]om;IiL?0kYOcDh@j;E7AhGfXIN`XW@[YlTB[XcF7]d8hkS@2lcg@CBPj;SibYC@PT@[@jEd