473,322 Members | 1,268 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,322 software developers and data experts.

can't do that request

Sam
Hi,
I'm going to explain as clearly as possible:

I have two tables:

Relationships(relation_id, table1, table2)
Relationfields(relation_id, field1, field2)

In Relationships, relation_id is the primary key
In Relationfields, relation_id is the foreign key

I have a front-end interface that allows the user to add records to
Relationships and Relationfields as followed:

The user selects a table1 and table2 values from listboxes. These are
real table names from sys.objects, so then the user can select fields
of these tables on which he wants to create a JOIN.
Anyway, I can easily insert the table1 and table2 into Relationships
(relation_id is an auto-increment). Then I need to get the relation_id
of this new Relationship (easy since I know which values I've inserted
and table1-table2 associations are unique.

Now the PROBLEM :
I need to insert into Relationfields all the fields selectioned by the
user for each of the two tables . But the user might have selected
several fields from table1 and table2, so I need to pass A LIST
PARAMETER to my Stored Procedure as I don't know how many values of
field1 and field2 there is going to be.

I hope this is clear enough. Is it possible to achieve what I want ?
Should I pass an entire concatenated string with values separated by
comma or whatever and then decrypt it in the stored procedure ?

Thx

Jul 23 '05 #1
7 1392
Sam
Could anyone help please ?

Jul 23 '05 #2
If you're asking how to pass a list into a procedure as a parameter,
then see here:

http://www.sommarskog.se/arrays-in-sql.html

If that doesn't help, I suggest you post CREATE TABLE and INSERT
statements to clarify exactly what you need:

http://www.aspfaq.com/etiquette.asp?id=5006

Simon

Jul 23 '05 #3
Sam
thanks. I think the first link should help me doing what I want.
Regards

Jul 23 '05 #4
Why are you putting metadata in your schema, in total violation of the
basic principles of a relational database? Why don't you know the
differences between rows and records, fields and columns, data and
metadata?

You can kludge this with a lot of dynamic SQL that will run like cold
glue, have no data integrity and be unmaintainable. Someone will
probably help you do this. Please read a few books before you destroy
your employers data.

Jul 23 '05 #5
The best way to pass multiple-row data into a stored procedure is using
OPENXML, any other method is a kludge.

Jul 23 '05 #6
Sam
I put meta data in my shema because my employer pays me to do so... I'm
developping an administration tool for maintaining dynamic metadata of
a website.
Now I'm not sure in what way your comment is of any use to me...

Jul 23 '05 #7
Sam
Ellen K > Thanks I'll look at this in the future. But I've found a
better way this time to avoid passing multiple-row data to my stored
procedure:)
Thx!

Jul 23 '05 #8

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

Similar topics

0
by: J. Muenchbourg | last post by:
I'm cannot seem to get my request objects posted from a form on a previous page to show up on the page I'm posting to. When I try it locally on my IIS webserver, it works fine. But the form posting...
1
by: Matt | last post by:
If we use GET protocol, we can use either Request("controlname") or Request.QueryString("controlname") to get the data entered by the user. But if we use POST protocol, we MUST use...
0
by: mews.microsoft.com | last post by:
My ASP.NET pages record the referal url for each current page into session. This is then being used by the cancel button to go back to the calling page. Page Navigation is achieved thru'...
0
by: Luis Esteban Valencia | last post by:
Hello. I am making the practice of chapter 6. Biztalk Unleashed its about sending an HTTP request with a c# webform. I got this error Unable to complete web request. Web Exception error: Error...
0
by: kaczmar2 | last post by:
Hello, I have an aspx page which is posting xml content to another asp.net page, but the request.length is always 0. I think there should be something there. below is the code for the...
0
by: =?Utf-8?B?YmV5YXo=?= | last post by:
I have the follwing code and cannot receive e mails sent from my contact form. Please advise how can i make it work with CDOSYS. Thank you. <% form_from = "info@nnn.com" form_to =...
1
by: =?Utf-8?B?YmV5YXo=?= | last post by:
I have the follwing code and cannot receive e mails sent from my contact form. Please advise how can i make it work with CDOSYS. Thank you. <% form_from = "info@nnn.com" form_to =...
5
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request...
4
by: MATTXtwo | last post by:
Hi guys I need an answer... Is't posibble an asp pages to have more querystring? DBS=Request("TarikhLahir") TL=Request("tlahir") Negara=Request("Country") Negeri=request("State")...
8
lifeisgreat20009
by: lifeisgreat20009 | last post by:
What might be the possible cause ? I have created a website using struts framework, jsp In my transaction page the money is not getting transferred.. When I hit the submit button in my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
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 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.