help help help with getting started

I have a simple page with this code:

<%@ Page Language="vb" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SQLClient" %>
<script runat="server">
sub Page_load(Sender As Object, E As EventArgs)
if not ispostback then
'create connection
Dim Conn As SqlConnection = New SqlConnection
'create data adapter
Dim dataAdapter As SqlDataAdapter = New SqlDataAdapter
'create dataset
Dim dataview1 As DataSet = New DataSet
'create SQL string
Dim SQL As string = "SELECT top 1 [site_items].[image1] FROM [site_items] WHERE (([site_items].[site_code] =14) AND ([site_items].[cat_code] = 35))"
'assign the connection string to the connection object Connectionstring property
Conn.ConnectionString = "server='(local)'; user id='sa'; password=''; database='origin'"
'create command object
dataAdapter.Selectcommand = new SqlCommand(SQL, Conn)
'open the adapter selectcommand property
dataAdapter.Selectcommand.Connection.open
'fill the dataset
dataAdapter.fill(dataview1, "images")
'associate the datagrid to the dataset
DG1.datasource = dataview1.tables("images")
'bind the dataset to the datagrid
Page.DataBind
'close the adapter selectcommand property
dataAdapter.Selectcommand.Connection.close
end if
end sub
</script>

and then an image control which looks like this:
<asp:image id="image1" runat="server" imageurl='<%# databinder.eval(dataview1, [0].image1)%>'></asp:image>
But I get this error:
Compiler Error Message: BC30451: Name 'dataview1' is not declared.

What am I doing wrong?
Thanks
Howard
0
howardswanwick
10/7/2003 4:36:02 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

1 Replies
1155 Views

Similar Articles

[PageSpeed] 37

Please don't do multiple posts for the same question. I've answered on you other thread: take the Dim DataView1 out of Page_Load.
Bertrand
----
This posting is provided "AS IS" with no warranties, and confers no rights.
0
bleroy
10/8/2003 12:52:24 AM
Reply:

Similar Artilces:

Help Help Help Help Help Help
------=_NextPart_000_0074_01C2960E.EBE13A30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can someone please help me. I have installed mysql on Unix Solaris and it works fine I have Perl installed previously which is working and with which i have installed other perlmodules before and are working fine. I have also installed DBI and it works fine with the Sybase drivers which i have installed. When i tried to install the Msql-Mysql-modules-1.2219 drivers i get the following error. # make /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/...

HELP!HELP!HELP!HELP!HELP!HELP!
I was using powerbuilder4.0 a month ago I decided that migrate it to PB7.0 When Im using 4.0, in datawindows I was using extra colums additional to stores procedure. I mean that for example; stored proc. returns 4 columns. I was using 2 extra columns to modify something from client. But I cant do the same thing in PB7.0. How can I do that??? please help. Gurcan yucel gyucel@infina.com.tr "I was using 2 extra columns to modify something from client." what does this mean that you added to the result set? If so then just goto the SQL and add a param. Then set the...

help help help help
Name: chef mario Email: chefusa_at_pacbell.net Product: Firefox Summary: help help help help Comments: Heard great reports about Firefox!!! Downloaded & installed Firefox !!!! Lost All my very very valuable BOOKMARKS!!! CAN ANYONE HELP!!!!! All bookmarks were in Internet Explorer Did bookmark transfer to Firefox. Seem the Fox eat all m,y bookmarks Need serious help anyone. chef mario Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 ...

Help Help Help Help
i need to create a crosstab report using Crystal reprot for VS 2003 i face aproblem when i need to order my Fileds by their names my data must be like this Basic Cola Housing Gross Deduction1 Deduction2 Deduction3 Net but when i run my report it give my a not sorted data acutally i have acode field which can i order field using it. but i don't knwo how to do thisSo..................? Select Report tab | |-->Select Record Sort expert Choost the fields you want to sort --Select the corresponding sort direction f...

Help!help!help!
Whether can I set a window to be unmoveable when the application is run,whatever the window is normal or max when it's running?If it may be set,how.... ...

help! help! help!
I got such errors while installing a new replication server,please help me !Thanks a lot. T. 2003/05/29 14:21:24. (-1): Hardware Exception: c0000005, EXCEPTION_ACCESS_VIOLATION T. 2003/05/29 14:21:24. (-1): Thread GLOBAL RS(GLOBAL RS) infected with signal -1073741819 T. 2003/05/29 14:21:24. (-1): ***************STACK TRACE*************** T. 2003/05/29 14:21:24. (-1): *****thread GLOBAL RS(GLOBAL RS)******* T. 2003/05/29 14:21:24. (-1): unknown function 0x0038c559 () T. 2003/05/29 14:21:24. (-1): unknown function 0x0038bb65 () T. 2003/05/29 14:21:24. (-1): pc: 0x00468934, err_h...

help help help
after i unload., theni install adaptaive server.......everythings running well but unluckily it cannot start the adaptive server when installing but backupserver and XP server can install and start it Building Adaptive Server "abc", unable to boot server "abc" server "abc" was not connected anyone can help me Was an errorlog created for this ASE in the ASE install directory? If so, what does it say? Zidane wrote: > after i unload., theni install adaptaive server.......everythings running > well > but unluckily it cannot st...

HELP HELP HELP
I need EAS 3.0.1 mantainance as soon as possible or at least an updated datawindow.jar. I've already asked the mantainance CD to italian Sybase support but they know nothing about it. If someone from sybase could send me an updated datawindow.jar would be very very appreciated. Please email me to m.mazza@ads.it Thank you Mauro Mazza Research & Develop - Gruppo FINMATICA E-mail: m.mazza@ads.it http://www.ads.it ADS automated data systems - Data Processing S.p.A. Via Del Lavoro, 17 40127 Bologna - Italy tel. +39 051 6307 411 fax. +39 051 6307 498 We expect t...

help help help
i wanna know the list of compite time errors related to code correction/programming errors in powerbuilder.thanks lot cenk That's a pretty big request. You want a list of everything it is possible to do wrong in PowerBuilder? What you might want to do is search the solved cases infobase on the Sybase web site. On Tue, 15 Jun 1999 11:50:32 +0300, in powersoft.public.powerbuilder.general cenk KIZILDAG <cenk1536@yahoo.com> wrote: >i wanna know the list of compite time errors related to code >correction/programming errors in powerbuilder.thanks lot > >c...

help!help!help!
Sorry to re-post again, Hi, Dean : 1. Are you dialing an ISP or dialing modem pool in side the company? I am dailing an ISP. Because some of my client use this way. 2. Is the Jag server behind a firewall? No, there is no Firwall. 3. Do you have a proxy for the remote component? Yes. 4. What is the syntax of createinstance? ls_class = "p_packagename/n_cst_logon" if not isvalid(inv_logon) then ll_return = g_connect.CreateInstance(inv_logon,ls_class) if ll_return <> 0 then ls_return = ...

HELP!!!HELP!!!HELP!!!
I try set picture to database and import it to picture control. Why SetPicture funktio dosen�t work? blob b, tot_b integer li_FileNum, loops, i, ret long flen, bytes_read, new_pos string txtname, named string defext = "BMP", Filter = "bitmap Files (*.bmp), *.bmp" ret = GetFileOpenName("Open Bitmap", txtname, named, defext, filter) SetPointer(HourGlass!) flen = FileLength(txtname) li_FileNum = FileOpen(txtname, StreamMode!, Read!, LockRead!) IF flen > 32765 THEN IF Mod(flen, 32765) = 0 THEN loops = flen/32765 ELSE loops = (flen/32765...

HELP, HELP, HELP!!!!
can't Install dbd for postgreSQL someboy can help, Me How about some code. Do you have the DBD::pg installed? Send in you code so we can help. Ilya Sterin -----Original Message----- From: aguztyn@cancun.com.mx [mailto:aguztyn@cancun.com.mx] Sent: Monday, April 02, 2001 4:45 PM To: dbi-users@perl.org Subject: HELP, HELP, HELP!!!! can't Install dbd for postgreSQL someboy can help, Me ...

HELP, HELP, HELP
What am I doing WRONG #!/usr/bin/perl -w # # Consilta.cgi # push(@INC,"/var/www/cgi-bin/"); require("cgi-lib.pl"); $|=1; #use strict; use DBI; use CGI; sub avisa_y_salte { my $error = "@_"; print &PrintHeader; print "<h1>Error Inesperado</h1>"; print "<p>$error</p>"; print &HtmlBot; die $DBI::errstr; } my $version="V.20.01"; my $registro="<CENTER><H5><I>Consulta Ciudadana $version 2001. <A HREF=\"mailto:a...

HELP HELP HELP
i need help, i use an dbmaker 3.0 server and now i want to use an client to go on it but i dont have an client(i have dbmaker 3.6 but it don't work) who can help me with the dbmaker 3.0 client (tools,files,drivers) email me kelly.kloen@siteways.nl ...

Web resources about - help help help with getting started - asp.net.getting-started

Widow wins battle with Apple over deceased husband’s password
A widow in Canada has won her battle with Apple after the tech giant demanded that she get a court order to obtain her deceased husband’s Apple ...

Global growth pushes Netflix past profit forecast
Netflix Inc. reported better-than-expected profits in the fourth quarter, powered by a rapid growth in the number of international subscribers ...

George Clooney Weighs In on Oscars Diversity Controversy
George Clooney is speaking out in a lengthy statement about the lack of diversity at the 2016 Oscars after only white actors were nominated. ...

Broadway Box Office: ‘Hamilton’ Tops the Chart on MLK Day Weekend
The long weekend of Martin Luther King Jr. Day helped “Hamilton” hit the number one spot at the Broadway box office in a week that saw overall ...

Glenn Frey Was the Eagles' 'Backbone': Rock Journalist Ben Fong-Torres Pays ...
CNN Glenn Frey Was the Eagles' 'Backbone': Rock Journalist Ben Fong-Torres Pays ... Billboard That's something many critics had a tough time ...

Watch The Teaser For ‘Imperial Dreams’, The Sundance Pic That Got John Boyega ‘Star Wars’
Here’s an exclusive first look at Imperial Dreams , a film that stars John Boyega . Brought to Sundance two years ago by Like Crazy producer ...

Jamie Foxx Rescued Somebody From A Burning Vehicle Last Night: Reports
A vehicle reportedly rolled over and caught fire in front of Jamie Foxx ’s house in Ventura County Monday night. After calling 9-1-1 the SiriusXM ...

Twitter outage gets the day off to a rough start
People around the globe were stymied for a while Tuesday as they tried to get onto Twitter, which acknowledged that something was "technically ...

IS Acknowledges Death of 'Jihadi John' in Magazine
The SITE Intelligence Group says the Islamic State group is acknowledging the death of the masked militant known as "Jihadi John" who appeared ...

Amazon will now automatically order you detergent when you're running low
Last year, Amazon announced its Dash Button , letting people order products from its site with the push of a button. By September, the button ...

Resources last updated: 1/20/2016 12:05:45 AM