i have a phone field in one of my tables. the data is pretty ate up. there's some numbers with .,- and extra spaces among other things. how can i do a mass update i would like to have all the phone numbers formated like this 555-555-5555 .
I have a text field in a web page I am working on that seems to be calculating phone numbers before inserting them into an Access database. i.e., 867-5309 will result as -4442 in the Access text field. My guess is that the webserver or client is processing it before inserting it. Is there any way to stop this other than using a validation script?
this is a problem that is cropping up for the other developer here and i can't seem to find anything wrong. this code has worked for months and then the last couple of days it started sporadically not working. i'm thinking that it has to do with a performance issue but i'm not sure.
i don't use the ado .addnew or .update, so i'm a bit unfamiliar with the workings of it. here is a brief overview of the code.
ordRs.AddNew ... do the field updates ordRs.Update order = cint(ordRS.fields("order_id")
the problem is that order sometimes ends up as null, it's not getting the order_id field after the update. like is said, it's sporadic. anyone have any thoughts here?
ive got a table filled by a recordset with a column named "STATUS" each record is a sale transaction. the status of this transaction is either open or closed. right now the table displays whats in the database as is, but i want to add the functionality to be able to close a transaction from the table. i was thinking of 2 methods, one would be a check to see if the field = open, and if it is, make that field a link to a small popup that verifies the user wants to close the transaction then does its lil sql thing aand updates the table. the other way i was thinking was to check if its open and make it a drop down list that will update table when submitted. im veering more toward the former idea(not a fan of drop downs)
The code below is a bit more representative of what I'm doing:
<!--#INCLUDE FILE="Database_Open.asp"--> <% sql ="SELECT * FROM CustomerBase WHERE " & _ "UserName='" & username & "' AND " & _ "SECRETWORD='" & password & "' "
RS.Open Sql, Connection, 3
IF RS.EOF THEN 'redirect code here ELSE RS.Fields("Fullname").value = "Bob" RS.Update %><!--#INCLUDE FILE="Database_Close.asp"--><% Response.Redirect ("Menu_Account.asp") END IF %>
I'm having a spot of trouble trying to update fields in a access database using asp. I can delete and add fields thru the asp page but when i attempt to modify the fields i get a page not found error message. Code:
I have a asp form that has a dynamic drop-down box that a user selects a value from. Once the user makes a selection I use the onChange event to capture the selection and pass this value to a vbscript sub.
The sub then makes a adsi query using this value to retrieve additional information. This all works. I used a msgbox to display the retrieved value and it is correct. My problem is how do I update a field on the form with this retrieved value?
My products table has a weight field that I need to populate. A bunch of them have it and a bunch of them don't, but I need them all to have one. The weight is the same, 3, for all the records. I also have an Include field in that table. I want to make the weight field 3 for all records where the include field is true (it's a yes/no checkbox in access.)
I'm using Dreamweaver and I can build the SQL statement just fine but I'm not sure of how to loop through this to set the field for each of these records.
I am developing small asp application.There is a database called db.mdb and there are three tables(tblUser,tbsImport,tblcitylist) In tblcitylist there are two fiedls
1.Town 2.LReg
According to the relevent town there is a LReg (Lreg is a name already assign to the town) this part is ok.
In my tblUser there is a field called Town and LReg (Same as above table) But here LReg is empty.I mean there is a default value called "N/A"
I need to create a asp page for following purpose
* i need to read tblcitylist table and according to that I need to fill the LReg fields of TblUser Code:
Okay Whenever a user logs in we want to track the last time they logged in. My login script worked perfect before this now I can figure it out. All I did was add the way the table opens and the objRS.Update. Code:
I've declared a variable for the current date and want to use the UPDATE function to update the date field in a single record.
UPDATE lms_users Set leaver_date ="&MakeDate" WHERE user_id="473"
I know I have the date format in the variable as if I response.write it to the screen is displays correctly (28/08/2004). I must be doing something really silly, but can't see it.
I have a form where the first field is a dynamic drop-down that pulls from a db (Access). The fields associated with the query are task_id, task_name and task_rate. The field has the value of "task_id" and the label of "task_name".
In the second form field, I would like the default value to be determined by the selection made in the first field. Based on the selection of the first form field, I would like the default value of the this field (task_rate) to be populated with the associated task_rate value of the selection chosen above.
What I would like to happen on this page is that when a user selects a company name from a drop down list, his selection autopopulates the cID field based on the selection. The drop down list is getting its choices from the customer table.
As I am still a novice, I am sure there is a way to do it I have not been able to get it right. Code:
Our application tracks contact information. One of our clients, a car dealership, has asked about being able to enter a lastname and phone number and getting as much of the main form filled out as possible, "Hi, thanks for stopping by Demaux Motors. Before we get started, can I get your phone number, please? Oh, HI Joe, you still live on Gingerbread lane..?" etc etc etc. Filling out the form is easy - sql query, javascript, blah blah blah - getting the data is another. My question is three-fold:
1: I know that if you go to Google and type a phone number, you'll get a query result back with address, city, state, etc. The documentation for the Google APIs are written for .NET...anyone have any experience with those APIs in classic ASP?
2: Is there some other service that provides this same functionality?
I've been messing around with this for a while now and can't figure it out. I'm trying to use this code to pull a person's phone number out of a database:
<% call GetAddrInfo ("BenPhone_v",datavalue) if datavalue = TRUE then %> <%call GetAddrInfo ("BenPhone",datavalue)%> Phone Number: <%=datavalue%> <%end if%>
What it returns is an unformatted phone number (ie: 5555555555) Nothing I've tried will format the number. I think the problem is the code that's being used to retrieve data from the database, but I'm not sure: Code:
I run an eCommerce site and I have a checkout form that requests the customers phone number. I have it set up as one whole field, not broken up: 3,3,4 - too hard to re-work. Therefore a customer is free to enter anything: (987) 555-1234 9875551234 (9875551234 etc.
I want to format the phone number before it is saved to the database in the following format: 987-555-1234
Basically, I need to strip the number of everything except the numbers and then add a "-" after the 3rd and 6th number?
I have created an MS-Access DB that holds data items including phone number and currency. Utilzing the input mask function in MS-Access, and using Access to input data, keeps the data looking clean, i.e. $5,678.32 and (555) 555-1234. When I read this information from an ASP page into my repeatable region table (I'm using Dreamweaver btw), the data is displayed as 5678.32 and 5555551234. How can I format the data on my displayed ASP page to be formatted as currency and a proper phone number mask?
i am trying to format a telephone number (returned from the database as digits, no hyphens) to include hyphens. the database field is set as char with a length of 10. when i run the following code, i get a type mismatch error.
Private Sub formatDN(strTele)
'Changes a Telephone to a recognizable format if Len(strTele) = 10 then strFormatted = "(" & mid(strTele,1,3) & ") " & mid(strTele,4,3) & "-" & mid(strTele,7,4) response.write strFormatted Else response.write strTele End if End Sub
'section of code that calls the function HTML = HTML & "" & adoRSWEBtest(0) & " (" & adoRSWEBtest(1) & ") <br>" & formatDN(adoRSWEBtest(2)) & "<br><br>"
I will attach a zipped file with data in it. I want to pull distinct phone numbers from column B and column D (as some of the numbers will be the same). then rank by asc order based on TotalCashPrice. If they are the same, I want to compare the TotalCashPrice to TotalCashPrice2. Is that possible?
I have seen other poster's solutions to this question, but cannot make heads or tails of it so I thought maybe someone could answer my question specifically. On an ASP Details page, I have dynamic text with a company's address, phone and fax numbers. I want the phone and fax numbers to be formatted like (###) ###-#### on the screen. They are entered in MS Access in 10-digits only with an input mask to format them in Access.
I am using DWMX 2004 and am not a programmer or coder by any means. I create my recordsets in DWMX in simple mode, so if you can help me, please be specific. My field names are MbrMainPhone and MbrFax if that helps.
I'm looking for a way to send a text message to a nextel phone using asp. I tried some of my scripts,in the recipient field I included my email ("myemail.domain.com") and ("1234567@messaging.nextel.com").
the messsge was successfullysent to my email but failed in the nextel email. Also when I send the message through groupwise (our mailing system) the message to nextel goes through with no problem.
I need to open client phone dialer from my asp page that contains phone number and fill phone number automatically when dialing. What should I need to start about this?