I have a database that holds information in many tables. I have created an "Update" and an "Insert" form in dreamweaver MX 2004 which work fine but it allows me to add duplicate names in to the database. Does anyone know of any codeto stop this. If possible i would like it to bring up a pop up saying "Client Name Already Exists" etc
I have an .asp page that correctly queries a table and returns data if a 'job number' and week ending date exist and the user can update the information that is there. What I need to do is, if a record does not exist the page needs to create one and then refresh/requery so the user can edit the data. Any suggestions on how to accomplish this?
i have a textbox for user to put there loginid...and one button login valiablity...where user can click to check this userid is available...till here everything is ine...suppose between this another user registerd with same userid..and now first user will put this user id than it will get non avaliblity of this id.so in such case what should i do?
I have built a page that lists all our databases, the users connected to each database, and what application they are using. Because these databases are moved, or removed from time to time I need to check if the database still exists before trying to query it. Otherwise I get funny SID errors when it tries to process this command:-
Just wondering if someone could look at this and see where I may be going wrong. The basic concept is to use FileSystemObject to see if an image exists. If it does, display the image. If not, display image does not exists message.
<% Set fs=Server.CreateObject("Scripting.FileSystemObject") strFilename = ="e:path oimageprodPixscienceTN" & (RecordSet1.Fields.Item("ID").Value) & ".jpg" If (fs.FileExists(strFilename))=true Then %> <%=(Recordset1.Fields.Item("ID").Value)%> <% Else Response.Write("No Image Available") End If set fs=nothing %>
I populate a recordset and dump it into an array. How can I check if a value exist in the array? I want to check if the c_Member_mgr has a particular value or not?
Dim rs2 set rs2 = Server.CreateObject("ADODB.Recordset") rs2.open sub_Emp_Source, Conn
Dim aSubordinates
If not rs2.EOF then
aSubordinates = rs2.GetRows()
'Close Recordset to use the new array with the 2 columns data rs2.Close() set rs2 = Nothing
'Declare Constants for the above SQL columns for better readability 'Use these Constants instead of referring to the array numeric indexes Const c_Member_Mgr = 0 Const c_Subordinate = 1 Const c_EmpID = 3 Const c_EmpName = 4
I'm building some dynamic image links based on if the image file exists. How can I check 'if files exists' using asp or javascript? I've messed around some with FileSystemObject but so far no success.
is it possible to check a table exists before opening the record set? We have a sql query that requests information from a table depending on what information the user enters. So if the user enters information that requests a table that does not exist then I get the following error -:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E37) [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'y2005m12'
therefore is there a way to check the table exists before running the query or opening the recordset, and therefore redirecting the user to a different pages informing them of the problem?
I'm wanting to do a simple controlled voting page. I too our webserver off anonymous and everyone who accesses the website is a domain authenticated user. I've already done some control structure pages based on Request.ServerVariables("AUTH_USER"), which works great. That's also how I would do this page, in my basic thinking.
My idea is to have an access database with two tables. One table will have the vote written to it and the other table will have the AUTH_USER written to it when the employee casts their vote.
I'm wondering how I would do a test against that table to see if their name has already been written to the table. So, if an employee votes already, when they go to vote again, their user logon would be tested against all entries in the table and if it exists, the vote would not be written and they would be redirected to another page that politely tells them they've already voted.
I want to check whether a particular table exists or not in a database as we check whether a particular record exists in the table using Count(*) function.I get the table name from the user and will have to check whether the entry that he has given is a valid one or not. how to do this?
I have a left menu that is accessed and displayed via XMLHTTP (it resides on the same server). Some sections of the web site don't have a "menu.asp", so a "Page Not Found" page is returned, which doesn't look great in the menu column.. Is there a way to know if a page exists before using xml.responseText to pull it?
I have a problem with asp encrypt. I always encouter this error message when i try to log in my system thru an IP address. The strange thing i that, onli my computer is experiencing this problem. I tried loggin in using another computer, with the same IP address.. and it's sucuessful. Izzit the problem wif my ASP encrypt or wad? The error i have is:
how could I know if a specific sessionid still exists or not. If there is a method or anything that can tell me about the existence of a specific sessionid .
You'd think this would be the most basic sql query in the world but noooooo! I've tried this:
on error resume next strsql = "SELECT * FROM " & session("TablePrefix") & CurrentTable SET rs = conn.execute(strsql)
tableExists = 0
if (Err.number = 0) then tableExists = 1 end if
But it doesn't return an error if the table doesn't exist. I'm searching on the internet and hitting these long complicatred solutions involving the database "shema". Surely there is a simple way of telling with one line of sql if a table exists or not?
I'm currently workin on a project where by users have to register. I picked up some code from the internet but i get the following error: That username is already in use. Please choose another even though there is no data in my database yet. I'm using access 2000 as my database program. Code:
I am working on a image gallery and am trying to show images from different websites. Before I display an image I need to know whether that image exists on the other server and only display it if it exists.
I want to upload images from people and save the name of the files in a database so I can later populate from there. The uploading part is working fine, except that when I use SaveAs, if the file exist it rewrites the existing file...
I did do a search in the forums and tried to use a code that memnoch posted but it wont work since the aspsmartupload objetc doesnt support the FileExist Method... the code from Memnoch that i tried to use is the following: Code:
Does anyone know how I can check to see if an image exists on another web host? I tried using the file system object but it didn't seem to work. I think my problem is that I have to check a URL instead of an actual file path to see if something exists there.
I dont know if this is the right place to ask this but I have a database which contains shop details, each of which can have several images associated with it. In the database I am just storing the image paths, the actual images are held on a remote server.
I am able to grab the pathnames from the database and then use the following code to loop through the recordset displaying the associated image(s).
While NOT rs.EOF Response.Write("<img src=""servernameImages" & rs.Fields(0) & """ width=""150"" height=""150"">") rs.MoveNext
My question is, in the event of one of the images not being found, it just displays a red cross, is there any way of testing to see if the image exists before I try and display it?
I want to know how to search a database if a particular data is contained in it and then if the data is not there the page should go ahead to insert the data into the database and then redirect the user to another page but if the data is alraedy there it should go ahead a query another table where the user infomation where also stored.