🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #143

Re: Problema vb6

#143
From: Ulisse31
Date: Fri, 22 Apr 2011 10:35
72 lines
2711 bytes
Forse un p� in ritardo ma:

Aricerca � un valore integer o long..presumo.. ora, a che ti serve questo:

aricerca = Val(txtCognome1.Text)
txtCognome1.Text  =  aricerca ??????

Basta la prima riga e i valori sono uguali...

Poi, hai fatto un errore sulla stringa SQL.. da questa:

rs.Open "SELECT * FROM EE WHERE Cognome  =  aricerca ", cn, 1      'qui mi


Diventa:

rs.Open "SELECT * FROM EE WHERE Cognome  ="&   aricerca, cn, 1      'qui mi

� chiaro che, il campo Cognome deve essere di tipo Numeric e no Text... 
altrimenti hai fatto mooolti pi� erorri...

a presto..

Ciao ciao..





Il 16/03/2011 10.04, Pepe ha scritto:
> Ciao a tutti, vi posto un pezzo di codice che mi da errore:
>
> errore di run-time '-2147217904(80040e10)':
> Nessun valore specificato per alcuni parametri necessari.
>
> Potreste dirmi dove sbaglio? Premesso che non sono un esperto.
> Ecco il codice
>
> aricerca = Val(txtCognome1.Text)
> txtCognome1.Text  =  aricerca
>
> cn.Open stringa
>
> rs.Open "SELECT * FROM EE WHERE Cognome  =  aricerca ", cn, 1      'qui mi
> da l'errore citato sopra
>
>
>
>         While rs.EOF = False
>
>          txtData.Text = rs("Data")
>
>          txtCognome.Text = rs("Cognome")
>
>          txtNome.Text = rs("Nome")
>
>          txtTipo.Text = rs("Tipo")
>
>          txtNumDoc.Text = rs("Numero")
>
>          txtPas.Text = rs("Pas")
>
>          txtVisitato.Text = rs("Visitato")
>
>         Wend
>
>
>
> Grazie Ciao
>
>
>
Technical Details
Message-ID: <4db15837$0$18250$4fafbaef@reader2.news.tin.it>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsfeed.x-privat.org!feeder.news.tin.it!spool.news.tin.it!not-for-mail
References: <4d807d08$0$38646$4fafbaef@reader1.news.tin.it>

Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,d2a8e9b436d9695a
X-Google-NewGroupId: yes
X-Google-Attributes: gid3de4ef2fba,domainid0,public,usenet
X-Google-Language: ITALIAN,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsfeed.x-privat.org!feeder.news.tin.it!spool.news.tin.it!not-for-mail
Date: Fri, 22 Apr 2011 12:35:20 +0200
From: Ulisse31 <logos_sas@tiscali.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
Newsgroups: free.it.visual-basic
Subject: Re: Problema vb6
References: <4d807d08$0$38646$4fafbaef@reader1.news.tin.it>
In-Reply-To: <4d807d08$0$38646$4fafbaef@reader1.news.tin.it>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 73
Message-ID: <4db15837$0$18250$4fafbaef@reader2.news.tin.it>
Organization: TIN.IT (http://www.tin.it)
X-Comments: Please send technical notifications to newsmaster@tin.it
NNTP-Posting-Host: 62.110.120.17
X-Trace: 1303468087 reader2.news.tin.it 18250 62.110.120.17:3158
X-Complaints-To: Please send abuse reports to abuse@retail.telecomitalia.it