Dennis Baggott
|
| Posted: 11/30/2002, 7:50 AM |
|
I am starting to try to and switch from Code Charge to Code Charge Studio
and doing OK except I am stumped on this one. I am trying to do the
equivalent of:
vvvvvvvvvvvvvvvvvvv
sSql= "select fullname, Email,Location,Phone,Department from Users where
uid=" & ToSql(session("userid"),"Number")
openrs rs, sSQL
if not rs.EOF then
fldEmailAddr = GetValue(rs,"email")
fldLocation = GetValue(rs,"Location")
fldPhone = GetValue(rs,"Phone")
fldDept = GetValue(rs,"Department")
fldRequestor = GetValue(rs,"fullname")
end if
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I have found that Studio uses a CCGetsession and CCtoSQL but I can't see the
equivalent of the "fld.." and GetValue(rs,"..") above
Can anyone point in the right direction?
|
|
|
 |
DonB
|
| Posted: 11/30/2002, 10:06 AM |
|
Unless you have a really good reason not to, I'd say use the "Record
Builder" wizard instead of handcrafting a bunch of these.
But to answer the question, in CCS the functions are all prefixed with "CC".
The fields (textboxes?) are referenced by their name as listed in the
Property window (by default they look like this: "Textbox1"). So you'd
assign a value like this if the textbox was named "EmailAddr":
EmailAddr.Value = CCGetValue(rs,"email")
"Dennis Baggott" <dennis@lnsoftware.com> wrote in message
news:asamom$sch$1@news.codecharge.com...
> I am starting to try to and switch from Code Charge to Code Charge Studio
> and doing OK except I am stumped on this one. I am trying to do the
> equivalent of:
> vvvvvvvvvvvvvvvvvvv
> sSql= "select fullname, Email,Location,Phone,Department from Users where
> uid=" & ToSql(session("userid"),"Number")
> openrs rs, sSQL
> if not rs.EOF then
>
> fldEmailAddr = GetValue(rs,"email")
> fldLocation = GetValue(rs,"Location")
> fldPhone = GetValue(rs,"Phone")
> fldDept = GetValue(rs,"Department")
> fldRequestor = GetValue(rs,"fullname")
> end if
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> I have found that Studio uses a CCGetsession and CCtoSQL but I can't see
the
> equivalent of the "fld.." and GetValue(rs,"..") above
>
> Can anyone point in the right direction?
>
>
|
|
|
 |
Dennis Baggott
|
| Posted: 11/30/2002, 10:30 AM |
|
Thanks, Don. Here is the reason for what I am trying to do:
Customers/users will login to a page to see their requests in a browse
screen and either view or Add a New record (request). Now I am limitig the
records based on their login name, but whenever they add a request I want to
automatically "fill in" the full name, location, department, etc. So when
they add a new request they are updating a requests table and I want to also
plug in values from their user information table each time they add a
request. Does this make sense?
To see what I am trying to do (and could do in plain old Code Charge, not
yet in Studio) go to: http://www.lnsoftware.com/aahdpro2/CreateAccount.asp and set yourself -
bogus info if you want. Then, whenever you create a support request, at: http://www.lnsoftware.com/aahdpro2/CustomerRequestRecord.asp that
information (your full name, location, department, etc, is filled in
automatically.
Maybe the record builder would let me do the same thing, but maybe this "
EmailAddr.Value = CCGetValue(rs,"email")" will get me started.
Thanks Don,
Dennis
"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:asaun2$ae4$1@news.codecharge.com...
> Unless you have a really good reason not to, I'd say use the "Record
> Builder" wizard instead of handcrafting a bunch of these.
>
> But to answer the question, in CCS the functions are all prefixed with
"CC".
> The fields (textboxes?) are referenced by their name as listed in the
> Property window (by default they look like this: "Textbox1"). So you'd
> assign a value like this if the textbox was named "EmailAddr":
>
> EmailAddr.Value = CCGetValue(rs,"email")
>
>
> "Dennis Baggott" <dennis@lnsoftware.com> wrote in message
>news:asamom$sch$1@news.codecharge.com...
> > I am starting to try to and switch from Code Charge to Code Charge
Studio
> > and doing OK except I am stumped on this one. I am trying to do the
> > equivalent of:
> > vvvvvvvvvvvvvvvvvvv
> > sSql= "select fullname, Email,Location,Phone,Department from Users where
> > uid=" & ToSql(session("userid"),"Number")
> > openrs rs, sSQL
> > if not rs.EOF then
> >
> > fldEmailAddr = GetValue(rs,"email")
> > fldLocation = GetValue(rs,"Location")
> > fldPhone = GetValue(rs,"Phone")
> > fldDept = GetValue(rs,"Department")
> > fldRequestor = GetValue(rs,"fullname")
> > end if
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >
> > I have found that Studio uses a CCGetsession and CCtoSQL but I can't see
> the
> > equivalent of the "fld.." and GetValue(rs,"..") above
> >
> > Can anyone point in the right direction?
> >
> >
>
>
|
|
|
 |
|