![]() |
Sergey Kornilov admin 8/9/2007 |
If field name has spaces in it use wrappers. select Assigned_Tech from Users where [User Name]= ... |
K
|
KingDean author 8/10/2007 |
Sub AddOnLoad() If field name has spaces in it use wrappers. If your database is MS Access the following will work: |
K
|
KingDean author 8/10/2007 |
Sorry to mention, i am actually using MySQL for Database Sub AddOnLoad() str = "select Assigned_Tech from Users where '[User Name]' = '" & Session(strTableName & "_masterkey1") &"'" Set rsTemp = server.CreateObject("ADODB.Recordset") rsTemp.open str, dbConnection Session("Assigned_Tech") = rsTemp("Assigned_Tech") rsTemp.close : set rsTemp = nothing End Sub that is the code i am using now, when i do implement the change i get Error number -2147352567 Error description Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. URL /Laurel Srms/Create_Work_Ticket_add.asp Let me say what i am doing. When a user registers, they select there location, when they select that location the system will automatically place the assigned tech for that location in the users table. I need for the above to place in the keyed work order the assigned tech for that users location from the users table. Am i looking at this wrong? The prefered method would be for the locations table to automatically place the default assigned tech from the location they choose on the work order, because in some instances a user could select a location that isn't there default user location and i need for that to actually pull Here is the following. I have a locations table that the users table pulls from. In the location table it has the LocId and Name THe Users table will Display the name of the location, and when they select there location it looks at the location table to get the assigned tech. WHen they key a work order, they can assign the location of the request, but i need for that table to look back at the locations table and get the assigned tech from it. Can't get that to work. Thanks so much for being the best asp support there is. I am not very familiar with joines or session variables, just learn as i go. |
![]() |
Sergey Kornilov admin 8/12/2007 |
select Assigned_Tech from Users where `User Name`= ... |
K
|
KingDean author 8/12/2007 |
select Assigned_Tech from Users where `User Name`= ...
|