473,835 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB Function to return array to ASP

Raj
I need a VB function to return array of collections like

Private Type Employee
empname as string
address as string
salary as integer
deptno as integer
End Type

dim employees() as Employee

Public Function getEmployees() as Employee()
getEmployees=em ployees
End Function

I will call that function in ASP.

This was not working any other method is welcomed.

Regards,

Raj.
Mar 23 '07 #1
10 5623

"Raj" <ra*@track-mate.netwrote in message
news:el******** *****@TK2MSFTNG P05.phx.gbl...
I need a VB function to return array of collections like

Private Type Employee
empname as string
address as string
salary as integer
deptno as integer
End Type

dim employees() as Employee

Public Function getEmployees() as Employee()
getEmployees=em ployees
End Function

I will call that function in ASP.

This was not working any other method is welcomed.

Regards,

Raj.
First off the code above doesn't compile. You can't expose a private type
as a return value of a public member. You would need make the Employee type
public to get it to compile. Unfortunately that still doesn't help a great
deal with ASP.

ASP only has one data type, the variant (or two if you count an array of
variants as a type). Now whilst it is possible to re-arrange the VB code to
pass a reference to User-Defined type into a variant and thus into VBScript
you can't access the members of the type. The VBScript parsing doesn't
allow for the 'type.member' notation to work both for objects and for UDTs
as it does in VB6.

If the ASP merely needs to hold reference to a type that is passed to
another component then that is possible as long as appropriate measures are
taken to ensure the interfaces are compatible with Script in this way (I.E.
takes a variant ByRef).

If you need the ASP code to be able to access the members of the type then
you will need to use a class instead:-

'Class Employee
Public empname as string
Public address as string
Public salary as integer
Public deptno as integer
'Your class

Dim employees() as Variant ' Actuall contains employess objects

Public Function getEmployees() As Variant
getEmployees = employees
End Public

However that can get expensive. It may be better to turn your class into a
form of a collection. E.g.,

Dim employess() as Employee
Dim mlCount as Long

Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Public Property Get Count() as Long
Count = mlCount
End Property


Mar 23 '07 #2
Raj
Thanx indeed for the valuable input, but I still have problems:

Here's what I did:

Have created a standard exe project with two classes:

Employee:
Public empname As String
Public address As String
Public salary As Integer
Public deptno As Integer

Company:
Dim employess() As Employee
Dim mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

I had a form with Command Button. On it's click event I wrote like:

Private Sub Command1_Click( )
Dim cmp1 As New Company

cmp1.Item(1) = New Employee
cmp1.Item(1).de ptno = "10"
cmp1.Item(1).em pname = "Raj"

cmp1.Item(2) = New Employee
cmp1.Item(2).de ptno = "20"
cmp1.Item(2).em pname = "Ram"

Print cmp1.Count
End Sub

Then I got a compile error at:
Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Error Message: Sub or Function not defined.

It seems I am missing something.

Please let me know.

Thank you very much.

Regards,

Raj.
----- Original Message -----
From: "Anthony Jones" <An*@yadayadaya da.com>
Newsgroups: microsoft.publi c.inetserver.as p.general
Sent: Friday, March 23, 2007 4:32 AM
Subject: Re: VB Function to return array to ASP

>
"Raj" <ra*@track-mate.netwrote in message
news:el******** *****@TK2MSFTNG P05.phx.gbl...
>I need a VB function to return array of collections like

Private Type Employee
empname as string
address as string
salary as integer
deptno as integer
End Type

dim employees() as Employee

Public Function getEmployees() as Employee()
getEmployees=em ployees
End Function

I will call that function in ASP.

This was not working any other method is welcomed.

Regards,

Raj.

First off the code above doesn't compile. You can't expose a private type
as a return value of a public member. You would need make the Employee
type
public to get it to compile. Unfortunately that still doesn't help a
great
deal with ASP.

ASP only has one data type, the variant (or two if you count an array of
variants as a type). Now whilst it is possible to re-arrange the VB code
to
pass a reference to User-Defined type into a variant and thus into
VBScript
you can't access the members of the type. The VBScript parsing doesn't
allow for the 'type.member' notation to work both for objects and for UDTs
as it does in VB6.

If the ASP merely needs to hold reference to a type that is passed to
another component then that is possible as long as appropriate measures
are
taken to ensure the interfaces are compatible with Script in this way
(I.E.
takes a variant ByRef).

If you need the ASP code to be able to access the members of the type then
you will need to use a class instead:-

'Class Employee
Public empname as string
Public address as string
Public salary as integer
Public deptno as integer
'Your class

Dim employees() as Variant ' Actuall contains employess objects

Public Function getEmployees() As Variant
getEmployees = employees
End Public

However that can get expensive. It may be better to turn your class into
a
form of a collection. E.g.,

Dim employess() as Employee
Dim mlCount as Long

Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Public Property Get Count() as Long
Count = mlCount
End Property

"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:Ot******** ********@TK2MSF TNGP03.phx.gbl. ..
>
"Raj" <ra*@track-mate.netwrote in message
news:el******** *****@TK2MSFTNG P05.phx.gbl...
>I need a VB function to return array of collections like

Private Type Employee
empname as string
address as string
salary as integer
deptno as integer
End Type

dim employees() as Employee

Public Function getEmployees() as Employee()
getEmployees=em ployees
End Function

I will call that function in ASP.

This was not working any other method is welcomed.

Regards,

Raj.

First off the code above doesn't compile. You can't expose a private type
as a return value of a public member. You would need make the Employee
type
public to get it to compile. Unfortunately that still doesn't help a
great
deal with ASP.

ASP only has one data type, the variant (or two if you count an array of
variants as a type). Now whilst it is possible to re-arrange the VB code
to
pass a reference to User-Defined type into a variant and thus into
VBScript
you can't access the members of the type. The VBScript parsing doesn't
allow for the 'type.member' notation to work both for objects and for UDTs
as it does in VB6.

If the ASP merely needs to hold reference to a type that is passed to
another component then that is possible as long as appropriate measures
are
taken to ensure the interfaces are compatible with Script in this way
(I.E.
takes a variant ByRef).

If you need the ASP code to be able to access the members of the type then
you will need to use a class instead:-

'Class Employee
Public empname as string
Public address as string
Public salary as integer
Public deptno as integer
'Your class

Dim employees() as Variant ' Actuall contains employess objects

Public Function getEmployees() As Variant
getEmployees = employees
End Public

However that can get expensive. It may be better to turn your class into
a
form of a collection. E.g.,

Dim employess() as Employee
Dim mlCount as Long

Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Public Property Get Count() as Long
Count = mlCount
End Property


Mar 23 '07 #3

"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Thanx indeed for the valuable input, but I still have problems:

Here's what I did:

Have created a standard exe project with two classes:

Employee:
Public empname As String
Public address As String
Public salary As Integer
Public deptno As Integer

Company:
Dim employess() As Employee
Dim mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

I had a form with Command Button. On it's click event I wrote like:

Private Sub Command1_Click( )
Dim cmp1 As New Company

cmp1.Item(1) = New Employee
cmp1.Item(1).de ptno = "10"
cmp1.Item(1).em pname = "Raj"

cmp1.Item(2) = New Employee
cmp1.Item(2).de ptno = "20"
cmp1.Item(2).em pname = "Ram"

Print cmp1.Count
End Sub

Then I got a compile error at:
Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Error Message: Sub or Function not defined.

It seems I am missing something.

Please let me know.

Thank you very much.

Regards,

Raj.
Yeah you spelt employees wrong in the Dim. However here is a more complete
solution:-

Company:
Private maoEmployees() As Employee
Private mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

Public Function AddEmployee() as Employee

If mlCount = UBound(maoEmplo yees) Then
ReDim Preserve maoEmployess(ml Count * 2) As Employee
End If

mlCount = mlCount + 1

Set AddEmployee = New Employess

Set maoEmployees(ml Count) = AddEmployee

End Function

Public Function Item(ByVal Index as Long) As Employee
Set Item = maoEmployees(In dex)
End Public

Private Sub Class_Initialis e()

ReDim maoEmployees(16 ) As Employee

End Sub

Now you populate with:-

Dim cmp1 As New Company

With cmp1.AddEmploye e
.deptno = "10"
.empname = "Raj"
End With

With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

My question now is why VB6?
Why not just use VBScripts own Classes etc?


Mar 23 '07 #4
Raj
I am in the making of some component

I appreciate very much your help.
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OJ******** ******@TK2MSFTN GP03.phx.gbl...
>
"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>Thanx indeed for the valuable input, but I still have problems:

Here's what I did:

Have created a standard exe project with two classes:

Employee:
Public empname As String
Public address As String
Public salary As Integer
Public deptno As Integer

Company:
Dim employess() As Employee
Dim mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

I had a form with Command Button. On it's click event I wrote like:

Private Sub Command1_Click( )
Dim cmp1 As New Company

cmp1.Item(1) = New Employee
cmp1.Item(1).d eptno = "10"
cmp1.Item(1).e mpname = "Raj"

cmp1.Item(2) = New Employee
cmp1.Item(2).d eptno = "20"
cmp1.Item(2).e mpname = "Ram"

Print cmp1.Count
End Sub

Then I got a compile error at:
Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Error Message: Sub or Function not defined.

It seems I am missing something.

Please let me know.

Thank you very much.

Regards,

Raj.

Yeah you spelt employees wrong in the Dim. However here is a more
complete
solution:-

Company:
Private maoEmployees() As Employee
Private mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

Public Function AddEmployee() as Employee

If mlCount = UBound(maoEmplo yees) Then
ReDim Preserve maoEmployess(ml Count * 2) As Employee
End If

mlCount = mlCount + 1

Set AddEmployee = New Employess

Set maoEmployees(ml Count) = AddEmployee

End Function

Public Function Item(ByVal Index as Long) As Employee
Set Item = maoEmployees(In dex)
End Public

Private Sub Class_Initialis e()

ReDim maoEmployees(16 ) As Employee

End Sub

Now you populate with:-

Dim cmp1 As New Company

With cmp1.AddEmploye e
.deptno = "10"
.empname = "Raj"
End With

With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

My question now is why VB6?
Why not just use VBScripts own Classes etc?


Mar 24 '07 #5
Raj
With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

Putting ? cmp1.Count return Subscript out of range error at line:

If mlCount = UBound(maoEmplo yees) Then
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OJ******** ******@TK2MSFTN GP03.phx.gbl...
>
"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>Thanx indeed for the valuable input, but I still have problems:

Here's what I did:

Have created a standard exe project with two classes:

Employee:
Public empname As String
Public address As String
Public salary As Integer
Public deptno As Integer

Company:
Dim employess() As Employee
Dim mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

I had a form with Command Button. On it's click event I wrote like:

Private Sub Command1_Click( )
Dim cmp1 As New Company

cmp1.Item(1) = New Employee
cmp1.Item(1).d eptno = "10"
cmp1.Item(1).e mpname = "Raj"

cmp1.Item(2) = New Employee
cmp1.Item(2).d eptno = "20"
cmp1.Item(2).e mpname = "Ram"

Print cmp1.Count
End Sub

Then I got a compile error at:
Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Error Message: Sub or Function not defined.

It seems I am missing something.

Please let me know.

Thank you very much.

Regards,

Raj.

Yeah you spelt employees wrong in the Dim. However here is a more
complete
solution:-

Company:
Private maoEmployees() As Employee
Private mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

Public Function AddEmployee() as Employee

If mlCount = UBound(maoEmplo yees) Then
ReDim Preserve maoEmployess(ml Count * 2) As Employee
End If

mlCount = mlCount + 1

Set AddEmployee = New Employess

Set maoEmployees(ml Count) = AddEmployee

End Function

Public Function Item(ByVal Index as Long) As Employee
Set Item = maoEmployees(In dex)
End Public

Private Sub Class_Initialis e()

ReDim maoEmployees(16 ) As Employee

End Sub

Now you populate with:-

Dim cmp1 As New Company

With cmp1.AddEmploye e
.deptno = "10"
.empname = "Raj"
End With

With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

My question now is why VB6?
Why not just use VBScripts own Classes etc?


Mar 24 '07 #6

"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

Putting ? cmp1.Count return Subscript out of range error at line:

If mlCount = UBound(maoEmplo yees) Then
You need to fix my spelling mistake; this :-

ReDim Preserve maoEmployess(ml Count * 2) As Employee

Should be this:-

ReDim Preserve maoEmployees(ml Count * 2) As Employee

You should also ensure that all your modules start with the line:-

Option Explicit



>
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OJ******** ******@TK2MSFTN GP03.phx.gbl...

"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Thanx indeed for the valuable input, but I still have problems:

Here's what I did:

Have created a standard exe project with two classes:

Employee:
Public empname As String
Public address As String
Public salary As Integer
Public deptno As Integer

Company:
Dim employess() As Employee
Dim mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

I had a form with Command Button. On it's click event I wrote like:

Private Sub Command1_Click( )
Dim cmp1 As New Company

cmp1.Item(1) = New Employee
cmp1.Item(1).de ptno = "10"
cmp1.Item(1).em pname = "Raj"

cmp1.Item(2) = New Employee
cmp1.Item(2).de ptno = "20"
cmp1.Item(2).em pname = "Ram"

Print cmp1.Count
End Sub

Then I got a compile error at:
Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Error Message: Sub or Function not defined.

It seems I am missing something.

Please let me know.

Thank you very much.

Regards,

Raj.
Yeah you spelt employees wrong in the Dim. However here is a more
complete
solution:-

Company:
Private maoEmployees() As Employee
Private mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

Public Function AddEmployee() as Employee

If mlCount = UBound(maoEmplo yees) Then
ReDim Preserve maoEmployess(ml Count * 2) As Employee
End If

mlCount = mlCount + 1

Set AddEmployee = New Employess

Set maoEmployees(ml Count) = AddEmployee

End Function

Public Function Item(ByVal Index as Long) As Employee
Set Item = maoEmployees(In dex)
End Public

Private Sub Class_Initialis e()

ReDim maoEmployees(16 ) As Employee

End Sub

Now you populate with:-

Dim cmp1 As New Company

With cmp1.AddEmploye e
.deptno = "10"
.empname = "Raj"
End With

With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

My question now is why VB6?
Why not just use VBScripts own Classes etc?




Mar 25 '07 #7
Raj
I did that already
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OB******** ******@TK2MSFTN GP06.phx.gbl...
>
"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

Putting ? cmp1.Count return Subscript out of range error at line:

If mlCount = UBound(maoEmplo yees) Then

You need to fix my spelling mistake; this :-

ReDim Preserve maoEmployess(ml Count * 2) As Employee

Should be this:-

ReDim Preserve maoEmployees(ml Count * 2) As Employee

You should also ensure that all your modules start with the line:-

Option Explicit



>>
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OJ******* *******@TK2MSFT NGP03.phx.gbl.. .
>
"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Thanx indeed for the valuable input, but I still have problems:

Here's what I did:

Have created a standard exe project with two classes:

Employee:
Public empname As String
Public address As String
Public salary As Integer
Public deptno As Integer

Company:
Dim employess() As Employee
Dim mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

I had a form with Command Button. On it's click event I wrote like:

Private Sub Command1_Click( )
Dim cmp1 As New Company

cmp1.Item(1) = New Employee
cmp1.Item(1).d eptno = "10"
cmp1.Item(1).e mpname = "Raj"

cmp1.Item(2) = New Employee
cmp1.Item(2).d eptno = "20"
cmp1.Item(2).e mpname = "Ram"

Print cmp1.Count
End Sub

Then I got a compile error at:
Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Error Message: Sub or Function not defined.

It seems I am missing something.

Please let me know.

Thank you very much.

Regards,

Raj.
Yeah you spelt employees wrong in the Dim. However here is a more
complete
solution:-

Company:
Private maoEmployees() As Employee
Private mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

Public Function AddEmployee() as Employee

If mlCount = UBound(maoEmplo yees) Then
ReDim Preserve maoEmployess(ml Count * 2) As Employee
End If

mlCount = mlCount + 1

Set AddEmployee = New Employess

Set maoEmployees(ml Count) = AddEmployee

End Function

Public Function Item(ByVal Index as Long) As Employee
Set Item = maoEmployees(In dex)
End Public

Private Sub Class_Initialis e()

ReDim maoEmployees(16 ) As Employee

End Sub

Now you populate with:-

Dim cmp1 As New Company

With cmp1.AddEmploye e
.deptno = "10"
.empname = "Raj"
End With

With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

My question now is why VB6?
Why not just use VBScripts own Classes etc?




Mar 27 '07 #8
Raj
It seems the Class_Initializ e event of the Company class is never triggered.

"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OB******** ******@TK2MSFTN GP06.phx.gbl...
>
"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

Putting ? cmp1.Count return Subscript out of range error at line:

If mlCount = UBound(maoEmplo yees) Then

You need to fix my spelling mistake; this :-

ReDim Preserve maoEmployess(ml Count * 2) As Employee

Should be this:-

ReDim Preserve maoEmployees(ml Count * 2) As Employee

You should also ensure that all your modules start with the line:-

Option Explicit



>>
"Anthony Jones" <An*@yadayadaya da.comwrote in message
news:OJ******* *******@TK2MSFT NGP03.phx.gbl.. .
>
"Raj" <ra*@track-mate.netwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Thanx indeed for the valuable input, but I still have problems:

Here's what I did:

Have created a standard exe project with two classes:

Employee:
Public empname As String
Public address As String
Public salary As Integer
Public deptno As Integer

Company:
Dim employess() As Employee
Dim mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

I had a form with Command Button. On it's click event I wrote like:

Private Sub Command1_Click( )
Dim cmp1 As New Company

cmp1.Item(1) = New Employee
cmp1.Item(1).d eptno = "10"
cmp1.Item(1).e mpname = "Raj"

cmp1.Item(2) = New Employee
cmp1.Item(2).d eptno = "20"
cmp1.Item(2).e mpname = "Ram"

Print cmp1.Count
End Sub

Then I got a compile error at:
Public Property Get Item(ByVal Index As Long) As Employee
Set Item = employees(Index )
End Property

Error Message: Sub or Function not defined.

It seems I am missing something.

Please let me know.

Thank you very much.

Regards,

Raj.
Yeah you spelt employees wrong in the Dim. However here is a more
complete
solution:-

Company:
Private maoEmployees() As Employee
Private mlCount As Long

Public Property Get Count() As Long
Count = mlCount
End Property

Public Function AddEmployee() as Employee

If mlCount = UBound(maoEmplo yees) Then
ReDim Preserve maoEmployess(ml Count * 2) As Employee
End If

mlCount = mlCount + 1

Set AddEmployee = New Employess

Set maoEmployees(ml Count) = AddEmployee

End Function

Public Function Item(ByVal Index as Long) As Employee
Set Item = maoEmployees(In dex)
End Public

Private Sub Class_Initialis e()

ReDim maoEmployees(16 ) As Employee

End Sub

Now you populate with:-

Dim cmp1 As New Company

With cmp1.AddEmploye e
.deptno = "10"
.empname = "Raj"
End With

With cmp1.AddEmploye e
.deptno = "20"
.empname = "Ram"
End With

My question now is why VB6?
Why not just use VBScripts own Classes etc?




Mar 27 '07 #9

"Raj" <ra*@track-mate.netwrote in message
news:OV******** ******@TK2MSFTN GP03.phx.gbl...
It seems the Class_Initializ e event of the Company class is never
triggered.
>
Another spelling error I used the english Class_Initialis e.

Your spelling above is correct is that what your code is using?
Mar 27 '07 #10

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

Similar topics

6
14040
by: Krackers | last post by:
How do you write a function which returns a reference to an array. I can only get a function to return a copy of the array itself. I've had a look at some other threads in this group an the return value of a function acts like 'by Val' returning the value only (except for objects) can you make it return a reference instead? cheers, Krackers
4
157999
by: Isaac | last post by:
Hi mates I want to know a simple program of return array from function ? Do I need to use pointer to return the address of the first element in an array. Isaac
8
29074
by: Tweaxor | last post by:
Hey, I was trying to figure out was it possible in C to pass the values in an array from one function to another function. Is the possible in C? ex. y is the array that holds seven values If possible how could one pass these seven values in the array to a function that would check the values. I tried return y but it didn't work
8
3275
by: M. Moennigmann | last post by:
Dear all: I would like to write a function that opens a file, reads and stores data into an 2d array, and passes that array back to the caller (=main). The size of the array is not known before opening to the file. I fail to write a function that allocates memory for a 2d array and returns it to main. I was trying to pass a pointer to the array back to main, but main cannot access the data. The simplified code (no opening of file, but...
4
158501
by: _Mario.lat | last post by:
Hallo, I have a little question: In the function session_set_save_handler I can pass the name of function which deal with session. In Xoops code I see the use of this function like that: session_set_save_handler(array(&$sess_handler, 'open'), array(&$sess_handler, 'close'), array(&$sess_handler, 'read'), array(&$sess_handler, 'write'), array(&$sess_handler, 'destroy'), array(&$sess_handler, 'gc'));
17
3270
by: I.M. !Knuth | last post by:
Hi. I'm more-or-less a C newbie. I thought I had pointers under control until I started goofing around with this: ================================================================================ /* A function that returns a pointer-of-arrays to the calling function. */ #include <stdio.h> int *pfunc(void);
6
1531
by: Adam | last post by:
Hey, Just a quick appeal for suggestions re some code, able to pass varying numbers of arguments... I have a function which can accept varying numbers of arguments. It in turn calls a function whose argument list can vary in length. At the moment, I have something along the lines of...
4
2387
by: simon | last post by:
hi, I would like to separate my javascript completely from my xhtml. in the end there should be only <script type="text/javascript" src="javalib.js"></script> in the head-tag to my javascript. Because I want to use some ajax-requests and other javascript-functions on my xhtml, I need to dynamically add event handlers to any possible dom-elements. All solutions I found so fare are for specific, pre-known
4
2507
by: Christian Maier | last post by:
Hi After surfing a while I have still trouble with this array thing. I have the following function and recive a Segmentation fault, how must I code this right?? Thanks Christian Maier
1
6476
by: Beamor | last post by:
function art_menu_xml_parcer($content, $showSubMenus) { $doc = new DOMDocument(); $doc->loadXML($content);//this is the line in question $parent = $doc->documentElement; $elements = $parent->childNodes; need help. my site worked fine on my localhost but when i uploaded it to my live server i keep getting this error need help to recode line to match my hosting server. im using php 5 i have attached the common_method file
0
9803
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9652
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10808
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10520
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10560
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10233
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5804
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.