473,320 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

struct in asp

how can i have in asp the equivalent (in C++) of this:

struct s_my_table {

string name,
string sexe,
int age,
}
thanks
Jul 19 '05 #1
4 9353
for those of us unfamiliar with C++ how about a description

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
...Offering free scripts & code snippits for everyone...
---------------------------------------------------------

"smj92I" <sm*****@wanadoo.fr> wrote in message
news:bf**********@news-reader8.wanadoo.fr...
how can i have in asp the equivalent (in C++) of this:

struct s_my_table {

string name,
string sexe,
int age,
}
thanks

Jul 19 '05 #2
assuming it the same as in old C (and I think it is)

you can think of the table as an array of records, just like a DB table,
with th named fields of the indicated datatypes

so to refer to the Nth table elements age, you would use soemthing like

x = s_my_table(n).age

so in summary probably quicker/simpler just to write this data in to a DB
table an be done with it
"Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
news:OZ**************@TK2MSFTNGP12.phx.gbl...
for those of us unfamiliar with C++ how about a description

--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
..Offering free scripts & code snippits for everyone...
---------------------------------------------------------

"smj92I" <sm*****@wanadoo.fr> wrote in message
news:bf**********@news-reader8.wanadoo.fr...
how can i have in asp the equivalent (in C++) of this:

struct s_my_table {

string name,
string sexe,
int age,
}
thanks


Jul 19 '05 #3
Tia

"smj92I" <sm*****@wanadoo.fr> wrote in message
news:bf**********@news-reader8.wanadoo.fr...
how can i have in asp the equivalent (in C++) of this:

struct s_my_table {

string name,
string sexe,
int age,
}

What language was that again?
I think you're looking for the VB ' Type ' statement (user-defined data type),
which AFAIK is not "in asp". Look at the Class object and Property Get/Let/Set
instead maybe, or just use an array?

'VBScript has only one data type called a Variant.'
HTH
Jul 19 '05 #4
You can use structures in asp.net or you can create classes in VBScript

Example:

<%
Dim x
Set x = New Something
Response.Write x.Name & "<br />"
Response.Write " - not yet set, will set it to ""Jorg.""<br />"
x.Name = "Jorg"
response.write x.Name
Set x = Nothing
Class Something

Private sSetName

Private Sub Class_Initialize()
sSetName = "default"
End Sub

Public Property Get Name()
Name = sSetName
End Property

Public Property Let Name(sName)
sSetName = sName
End Property

End Class
%>

Ray at home

"smj92I" <sm*****@wanadoo.fr> wrote in message
news:bf**********@news-reader8.wanadoo.fr...
how can i have in asp the equivalent (in C++) of this:

struct s_my_table {

string name,
string sexe,
int age,
}
thanks

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Roy Hills | last post by:
When I'm reading from or writing to a network socket, I want to use a struct to represent the structured data, but must use an unsigned char buffer for the call to sendto() or recvfrom(). I have...
10
by: Rick Anderson | last post by:
All, I am receiving the following compilation error on LINUX (but not Solaris, HPUX, WIN32, etc): compiling osr.c LBFO.h(369): warning #64: declaration does not declare anything extern...
5
by: PCHOME | last post by:
Hello! I am working on dividing a single C file into several files. Now I encounter a problem about the global variables and can not find a way to solve it. All global variables and codes used...
19
by: Russell Shaw | last post by:
Hi, I have two structs in a header file, and they reference each other, causing a compile error. Is there a standard way to deal with this? typedef struct { ... RtAction *actions; }...
16
by: burn | last post by:
Hello, i am writing a program under linux in c and compile my code with make and gcc. Now i have 4 files: init.c/h and packets.c/h. Each header-file contains some: init.h: struct xyz {
5
by: Johs32 | last post by:
I have a struct "my_struct" and a function that as argument takes a pointer to this struct: struct my_struct{ struct my_struct *new; }; void my_func(struct my_struct *new); I have read...
7
by: Alex | last post by:
If I have two struct. See below: struct s1 { int type; int (*destroy)(struct s1* p); } struct s2 { struct s1 base;
4
by: hobbes992 | last post by:
Howdy folks, I've been working on a c project, compiling using gcc, and I've reached a problem. The assignment requires creation of a two-level directory file system. No files have to be added or...
4
by: hugo.arregui | last post by:
Hi! I have two struts like that: struct { int num; int num2; struct b arrayOfB; } a;
4
by: Sheldon | last post by:
Hi, I have a unique case where I need an array of structs that grows and within this array is another struct that grows in some cases. I'm having trouble allocating memory. Since I have never...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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....
0
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
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.