TWO REPEATERS IN ONE PAGE ?????????

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

This is working perfectly.

Sub Page_Load(sender As Object, e As EventArgs)

Dim cnn As SqlConnection = New
SqlConnection("server=lwda329.servidoresdns.net;database=qaf500;user=qaf500;
password=gruart")
Dim cmd As SqlDataAdapter = New SqlDataAdapter("SELECT * from
VentasWebConsultaES where IdPiso=" & Request.QueryString("Piso") & "", cnn)
Dim ds As DataSet = New DataSet()
cmd.Fill(ds)
Repeater1.DataSource = ds
Repeater1.DataBind()


End Sub


WHY THIS IS NOT WORKING????????

Sub Page_Load(sender As Object, e As EventArgs)

Dim cnn As SqlConnection = New
SqlConnection("server=lwda329.servidoresdns.net;database=qaf500;user=qaf500;
password=gruart")
Dim cmd As SqlDataAdapter = New SqlDataAdapter("SELECT * from
VentasWebConsultaES where IdPiso=" & Request.QueryString("Piso") & "", cnn)
Dim cmd02 As SqlDataAdapter = New SqlDataAdapter("SELECT * from
FotosWeb where IdPiso=" & Request.QueryString("Piso") & "", cnn)
Dim ds As DataSet = New DataSet()
Dim ds02 As DataSet = New DataSet()
cmd.Fill(ds)
cmd02.Fill(ds02)
Repeater1.DataSource = ds
Repeater1.DataBind()
Repeater02.DataSource = ds02
Repeater02.DataBind()

End Sub
 
did you really want to post your username and password to the world for your
sql server?
 
Hi,

I don't see it direct, what is the error?

Some advices about the code:

Use SQLparameters instead the & xxxx & for the SQL line

In this case where two connection actions are taken one after each other it
is better to open and close the connections yourself than to use the inbuild
open and close from the dataadapter

And of course that password.

However this has in my opinion nothing to do why it is not working. Can you
describe what you mean with not working?

Cor
 
It is giving an error when open the page from the link. The first example
works fine, but with the second I have got an error.

The fact is I have a page with one only record to be shown (a flat you are
interested to see information about) and also I need to show on that page
the 10 to 14 photos of that flat, whose files are inside a directory on the
web, and whose NAMES are inside another database in the SQL Server) Any help
on this would be highly appreciated.

By the way, thanks about the password. I have already changed it.
Desperation causes these things.

Thanks again.
 
Hi,

I tried it, although with one dataset and two repeaters, in my opinion was
it showed as it should be.

Can it be that you try to display a blob field in the repeater, although I
tried that as well and got byteArray?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top