Need help with DB manipulation... 
Author Message
 Need help with DB manipulation...

Here's the scenario:
   I've loaded a database into memory using .ASP server-side scripting.
What I need to do now is to transfer that to client-side, so the client
may view and choose items.  I want to do this using Msg/InputBox and
various other client side functions -- using server-side is not an option.

I've tried the following, and none work:

(enclosed in <SCRIPT> tags)

  dbFieldName = <% dbFieldName %>
  dbFieldName <% = dbFieldName %>
  Set dbFieldName = <% dbFieldName %>
  Set dbFieldName <% = dbFieldName %>

Please post a reply.

Thank you,
  Dan Hughes



Sat, 14 Oct 2000 03:00:00 GMT  
 Need help with DB manipulation...

Hi Dan,

I think you're misunderstanding how ASP works.  ASP generates HTML -- that's
it.  So what you're doing is the following:

<HTML>
foo = <% = foo %>
</HTML>

Suppose foo contains the string "bar" -- all this is doing is sending to the
client

<HTML>
foo = bar
</HTML>

That is, ASP generates _text_ which is sent to the client.  It doesn't send
the entire state of your database object to the client -- that might take
days.  If you want to do calls on server-side objects from client-side
script, you can use Remote Scripting -- see www.microsoft.com/scripting for
details.

Eric

Quote:

>Here's the scenario:
>   I've loaded a database into memory using .ASP server-side scripting.
>What I need to do now is to transfer that to client-side, so the client
>may view and choose items.  I want to do this using Msg/InputBox and
>various other client side functions -- using server-side is not an option.

>I've tried the following, and none work:

>(enclosed in <SCRIPT> tags)

>  dbFieldName = <% dbFieldName %>
>  dbFieldName <% = dbFieldName %>
>  Set dbFieldName = <% dbFieldName %>
>  Set dbFieldName <% = dbFieldName %>

>Please post a reply.

>Thank you,
>  Dan Hughes



Mon, 16 Oct 2000 03:00:00 GMT  
 Need help with DB manipulation...

Greetings Eric & Dan

Thanks to Eric for the clarification on ASP, but Dan's original question
still begs for an answer, and I'm struggling with the same issue.
MS Tech Support has only been able to send me sample code that doesn't
answer it either!
If I understand Dan correctly, he and I are wondering how to put, for
example,
a listbox control on a page and pre-fill it with data from the database.
It seems like a catch-22 to me - I can use server-side scripting to create a
recordset using ADO but the listbox object isn't created yet, and by the
time
the client creates it, the client has no access to the recordset created on
the
server!

PS: I am thrilled beyond words to see someone from MS participating!
THANKS!!!

--
David L Jarvis

--



Quote:
>Hi Dan,

>I think you're misunderstanding how ASP works.  ASP generates HTML --
that's
>it.  So what you're doing is the following:

><HTML>
>foo = <% = foo %>
></HTML>

>Suppose foo contains the string "bar" -- all this is doing is sending to
the
>client

><HTML>
>foo = bar
></HTML>

>That is, ASP generates _text_ which is sent to the client.  It doesn't send
>the entire state of your database object to the client -- that might take
>days.  If you want to do calls on server-side objects from client-side
>script, you can use Remote Scripting -- see www.microsoft.com/scripting for
>details.

>Eric


>>Here's the scenario:
>>   I've loaded a database into memory using .ASP server-side scripting.
>>What I need to do now is to transfer that to client-side, so the client
>>may view and choose items.  I want to do this using Msg/InputBox and
>>various other client side functions -- using server-side is not an option.

>>I've tried the following, and none work:

>>(enclosed in <SCRIPT> tags)

>>  dbFieldName = <% dbFieldName %>
>>  dbFieldName <% = dbFieldName %>
>>  Set dbFieldName = <% dbFieldName %>
>>  Set dbFieldName <% = dbFieldName %>

>>Please post a reply.

>>Thank you,
>>  Dan Hughes



Sun, 22 Oct 2000 03:00:00 GMT  
 Need help with DB manipulation...

Hi, If you want to create any client side object, with values from the
server side object, you have to remember that you can dynamically generate
the client side code with ASP.  For example, if rs is the record set...

dim buf,i
i = 0
buf = "<script language=""whatever_language"">"
do while not rs.eof
    ' sets listbox(i) to the i'th record of the recordset.
    buf = buf & "listbox(" & i & ") = " & rs("fieldname") & vbCrLF
    i = i + 1
loop
buf = "</script>
response.write( buf )   'writes the contents of buf to the client.

as you can see, I'm unfamiliar with the listbox item, but if it is client
side, this is how you can populate it with a record set object.

Quote:

>Greetings Eric & Dan

>Thanks to Eric for the clarification on ASP, but Dan's original question
>still begs for an answer, and I'm struggling with the same issue.
>MS Tech Support has only been able to send me sample code that doesn't
>answer it either!
>If I understand Dan correctly, he and I are wondering how to put, for
>example,
>a listbox control on a page and pre-fill it with data from the database.
>It seems like a catch-22 to me - I can use server-side scripting to create
a
>recordset using ADO but the listbox object isn't created yet, and by the
>time
>the client creates it, the client has no access to the recordset created on
>the
>server!



Mon, 23 Oct 2000 03:00:00 GMT  
 Need help with DB manipulation...

I guess I fail to see the problem  here. We do similar stuff like that all
the time. By listbox control, I presume you are referring to an activex
control

1 - you make the ADO query and extract the data iunto the ADO recordset.
2- you send out the listbox html object code substituting in the values from
the recordset in param or scripted assignment statements. (As indicated you
use the <%=varname%> code to do the substition)
3 client sees listbox with values.

actually very simple unless I misunderstand the issue. same approach works
with standard html document objects as well. the asp script sends the actual
values to the client in the desired locations in the html code. In fact you
could have the asp write ALL the html code if you wanted it to.

Terry Beavers
University of South Florida

Quote:

>Greetings Eric & Dan

>Thanks to Eric for the clarification on ASP, but Dan's original question
>still begs for an answer, and I'm struggling with the same issue.
>MS Tech Support has only been able to send me sample code that doesn't
>answer it either!
>If I understand Dan correctly, he and I are wondering how to put, for
>example,
>a listbox control on a page and pre-fill it with data from the database.
>It seems like a catch-22 to me - I can use server-side scripting to create
a
>recordset using ADO but the listbox object isn't created yet, and by the
>time
>the client creates it, the client has no access to the recordset created on
>the
>server!

>PS: I am thrilled beyond words to see someone from MS participating!
>THANKS!!!

>--
>David L Jarvis

>--



Mon, 23 Oct 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Need help with DB manipulation...

2. Context menu location manipulation: Help needed

3. : Need HELP with manipulation of Database in RUSSIAN

4. I need help with bitmap image manipulation

5. Need VB Help : Text Manipulation

6. Need help with string manipulation...please!

7. Need help with large array manipulation

8. : Need HELP with manipulation of the Databasein Russian language

9. File Manipulation ~ Chic Needs Help!

10. Urgent : Needs help in catching DB errors in JScript

11. Jscript and access db (client side only) - urgently need help

12. Help Needed - Javascript connection to an Access DB

 

 
Powered by phpBB® Forum Software