Hello i have one aspx page with vb code :
Dim zam As System.Data.DataTable
Dim PrimKey(1) As DataColumn
Dim myColumn As DataColumn = New DataColumn("id")
myColumn.ReadOnly = True
myColumn.AutoIncrement = True
myColumn.AutoIncrementSeed = 1
zam = New System.Data.DataTable("zam")
zam.Columns.Add(myColumn)
zam.Columns.Add("data_zamowienia", GetType(Date))
zam.Columns.Add("id_artykulu", GetType(Integer))
zam.Columns.Add("ilosc", GetType(Integer))
zam.Columns.Add("cena_netto", GetType(Decimal))
zam.Columns.Add("cena_brutto", GetType(Decimal))
zam.Columns.Add("kod_vat", GetType(Integer))
zam.Columns.Add("jednostka", GetType(String))
zam.Columns.Add("tryb", GetType(Integer))
zam.Columns.Add("typ", GetType(Integer))
zam.Columns.Add("indeks", GetType(String))
zam.Columns.Add("nazwa", GetType(String))
PrimKey(0) = zam.Columns("id")
zam.PrimaryKey = PrimKey
Session("zam") = zam
-----------------------------------------
and on the second aspx page i want to show this table and i use :
Dim zam As System.Data.DataTable
zam = session("zam")
ShoppingCart.DataSource = zam
ShoppingCart.DataBind()
and this is not working, i dont know why , i use that method on one aspx
page and it works but dont wanna work on other page, i get null reference
exception in :
ShoppingCart.DataSource = zam
Please give me a solution for dynamic table that works on all pages in one
web service
Patrick D. 2 1948
That shouldn't crash if 'zam' is nothing. That should crash if
'ShoppingCart' is nothing, since you are trying to access its DataSource
property, and that woudl fail if the object is null in the first place.
"ven" <ve*****@poczta.onet.pl> wrote in message
news:cl**********@news.onet.pl... Hello i have one aspx page with vb code :
Dim zam As System.Data.DataTable
Dim PrimKey(1) As DataColumn
Dim myColumn As DataColumn = New DataColumn("id")
myColumn.ReadOnly = True
myColumn.AutoIncrement = True
myColumn.AutoIncrementSeed = 1
zam = New System.Data.DataTable("zam")
zam.Columns.Add(myColumn)
zam.Columns.Add("data_zamowienia", GetType(Date))
zam.Columns.Add("id_artykulu", GetType(Integer))
zam.Columns.Add("ilosc", GetType(Integer))
zam.Columns.Add("cena_netto", GetType(Decimal))
zam.Columns.Add("cena_brutto", GetType(Decimal))
zam.Columns.Add("kod_vat", GetType(Integer))
zam.Columns.Add("jednostka", GetType(String))
zam.Columns.Add("tryb", GetType(Integer))
zam.Columns.Add("typ", GetType(Integer))
zam.Columns.Add("indeks", GetType(String))
zam.Columns.Add("nazwa", GetType(String))
PrimKey(0) = zam.Columns("id")
zam.PrimaryKey = PrimKey
Session("zam") = zam
-----------------------------------------
and on the second aspx page i want to show this table and i use :
Dim zam As System.Data.DataTable
zam = session("zam")
ShoppingCart.DataSource = zam
ShoppingCart.DataBind()
and this is not working, i dont know why , i use that method on one aspx page and it works but dont wanna work on other page, i get null reference exception in :
ShoppingCart.DataSource = zam Please give me a solution for dynamic table that works on all pages in one web service Patrick D.
U¿ytkownik "Marina" <so*****@nospam.com> napisa³ w wiadomo¶ci
news:uC*************@TK2MSFTNGP11.phx.gbl... That shouldn't crash if 'zam' is nothing. That should crash if 'ShoppingCart' is nothing, since you are trying to access its DataSource property, and that woudl fail if the object is null in the first place.
thank you
my repeater have another name that shoppingcart :)
Patrick This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Frnak McKenney |
last post by:
Back when computer dinosaurs roamed the earth and the precursors to
today's Internet were tiny flocks of TDMs living symbiotically with
the silicon giants, tracking access to data processing...
|
by: francis70 |
last post by:
Hi,
I have these 2 problem? Is there a way in Oracle to read UNCOMMITED
data. i.e. in Oracle the normal behaviour is that a user's updates to a
table are visible to other users ONLY when the...
|
by: Justin Lebar |
last post by:
Sorry about the huge post, but I think this is the amount of
information necessary for someone to help me with a good answer.
I'm writing a statistical analysis program in ASP.net and MSSQL7 that...
|
by: Mike P |
last post by:
Can anyone give me any advice on catching data concurrency errors? I
want to amend the code below so that if the record to be amended has
already changed since it was taken from the table, the...
|
by: Diane Yocom |
last post by:
I'm still very new to ASP.Net, so wanted to get some advice on how to solve
the following design problem (sorry my explanation is so long):
I'm developing an ASP.Net intranet app (using VB.Net...
|
by: Luis Esteban Valencia |
last post by:
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source...
|
by: Steve Atkins |
last post by:
I have an application where each user session opens and maintains a
long-lived connection to the postgresql backend database.
I need to keep a small amount of information (things like a unique...
|
by: 4.spam |
last post by:
Hello.
v8.2.
Is it possible?
Example:
---------------
create function t(v varchar(1))
modifies sql data
returns table(c varchar(1))
|
by: Thomas Eichner |
last post by:
Hi,
does anybody know a public website which offers a service that displays all data send by a browser (or an app calling the website),
especially HTTP GET and POST data, browser data etc.?
I...
|
by: Chris |
last post by:
All
I am cross-posting, as I'm not sure if this is an issue for the data layer
or the application layer. If this is unacceptable, can someone let me know
so that I don't do this in future.
...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |