Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Update and Select Expand / Collapse
Author
Message
Posted Friday, October 10, 2008 8:37 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 24, 2008 3:16 AM
Points: 12, Visits: 35

I am making an update into a tabe on SQl2005

sql = "Update web Set answer7='" & answer7 & "'" & " where erkennung=" & erkennung

then I am passing to the next Asp site by response redirect.




on the next site start9b.asp:

sql= "select* from web where erkennung=" & erkennung

this works fine. I can see the record RS("answer7"), but no other fields of the table.
For example RS("username") stays empty, but the username is in the same row like answer7 of the table. I can see it in the SQL table in the same row on the server.

Something to do with upgrade, I have no idea ?

Post #584019
Posted Friday, October 10, 2008 8:40 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436, Visits: 13,751
I'm not sure what you mean about the upgrade. Did you mean update?

The update changes the field specified only. If there is a username field in the web table, it's not affected.

You should not use SELECT *. Choose the fields you really need and pull those back specifically, that will help you troubleshoot.

You can also use SSMS to see what that row has in it by running the select against the server/database/table.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #584020
Posted Tuesday, October 14, 2008 6:14 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 24, 2008 3:16 AM
Points: 12, Visits: 35
Thanks.

First I inserted the first name and name with insert into the table .
ql= "INSERT INTO web(first name ,name,... )VALUES('" & first name & "','" & name & "', ... )"

Then by update into the fields answer1, answer2...

you are right about the select command.

sql= "select vorname, name, answer1, answer2, answer3, ... answer7 from web where erkennung=" & erkennung

But i can now only see a part of the fields.

I can see

to


but not
It is empty on the webpage, but the fields in the table web are with the data.

I have now idea yet
Post #585388
Posted Thursday, October 16, 2008 6:26 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 24, 2008 3:16 AM
Points: 12, Visits: 35
what ist SSMS ?
Post #586884
Posted Thursday, October 16, 2008 6:38 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, November 26, 2012 3:25 AM
Points: 1,389, Visits: 596
SSMS -> SQL Server Management Studio


Post #586892
Posted Thursday, October 16, 2008 6:45 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436, Visits: 13,751
your post got cut off, can you explain what "part" means?






Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #586900
Posted Thursday, October 16, 2008 7:19 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 24, 2008 3:16 AM
Points: 12, Visits: 35


I can only see rs("id"), rs("answer7"), rs("time")
but not rs("first name"), rs("name"),rs("answer1"), rs("answer2"), .....
on the web site
Post #586943
Posted Thursday, October 23, 2008 8:19 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, October 24, 2008 3:16 AM
Points: 12, Visits: 35
Here is the answer, ... I found it.

it depends on the order in the SQL statement of the columns;: SQL = Select id, first name, name, answer1, .... from tabel....

And ho you use it on the website,
rs("id") rs("first name") .... , By changing in the SQL Statement the order id, name, first name...

it works again.
Post #590481
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse