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 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?
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 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?
Anyone attempted this one yet using ASP? I've found a few PHP scripts, but nothing in ASP. Basically looking for this:
1. User takes a picture on their cell phone 2. User emails picture to statis email address on my site 3. Image is uploaded to my server 4. Image is displayed for others to see
I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?
in master batch table i have various master batch like 200701-0001 200701-0002 200701-0003
Now each master batch can have multiple final mixed batch like
200701-0001-01 200701-0001-02 200701-0001-03
and this record is inserted in to fmix table.
so i have a form in which i have a dropdown menu in which all the master batch is listed, i select 200701-0001 and that value is passed to next page where i will enter other fields data and insertion to my fmix_no will be done automatic like 200701-0001-01, 200701-0001-02 and so on,
how to achieve this
so in short each master batch will have more than one final mixed batch.
pls help, also if u have any online contact in yahoo or msn pls send me, i am so confused and badly struck deadline is just couple of hours away. my yahoo id is(E-Mail address blocked: See forum rules) you can PM me i am online right now.
I want To handel the error messages by myself in one part in my script. I know that in VB I can Use the statment - On error resume next And I also know that I can retrive the Error Number In VB with Err.Number.
How can I handel the errors by myself in ASP? I heard about the ASPErr Object, Is it the same thing like the err object in VB?
I have an error statement in place which i would like to catch when a problem aoccures and assign a value to Compensation. Code:
If Err.number<>0 then
If iCount Mod 2 = 1 Then objRS.Move ((iCount + 1)*0.9)-1 Compensation = Int(objRS(0)) Else objRS.Move (iCount*0.9)-1 Compensation = objRS(0) objRS.MoveNext Compensation = (Compensation + objRS(0))/2 End If Else Compensation = 0 End If
at the moment,Compensation seems to always have the value of 0 even when an error is not evident. Have i got this the wrong way around?
I am using the code below to count the number of records and divide it by the sum of the records to get the average number. I get the error : Type mismatch: 'ubound' . I know I'm missing something obvious as my experience with arrays have rendered below.
<% PriceArray = Recordset1("TotalBidPrice") %>
<% for x = 0 to ubound(PriceArray,2) CountArray = CountArray + PriceArray(0,x) next
I have a form on my site, in the form there is a field called ticketid, I want this field to be prepopulated everytime the user opens the form, Also would like to have it start with 1000 so if the it gets open second time its 1001, third time 1002 and so on. Code:
Microsoft OLE DB Provider for SQL Server (0x80040E2F) Cannot insert the value NULL into column 'ContactID', table 'ka0506a.ka0506a.contacts'; column does not allow nulls. INSERT fails. /submitcontact.asp, line 15
What happened is i used to used MS Access and ContactID is an Autonmuber field, and now my connection is set to MS SQL so it's giving me this error, what's causing this error to happen and how can i change it ?
I have a repeater that pulls back informtion from a MySQL database. I was wondering how could I put a counter that increments as each row is returned and displays it in the repeater. For example where it says Day:, I want to make that Day: 1, Day: 2 etc as each row is returned.
The Day: 1++ is just a demonstration of what i want incremented.
I've created a freight calculator that needs to know how many pallets I'm shipping. I'm using 1 pallet for 750lbs and an extra pallet for anything more than that.
If materialWeight <= 750 Then numPallets = 1 Else numPallets = Round(materialWeight / 750) End If
Now, let's say the materialWeight/750 ends up being 3.2. This is returning 3, but I need it to return 4 since we need an extra pallet.
How can I make it Round up to the next whole number? If it turned out to be an exact number without a decimal then it should stay where it is, but if it's over x.0 at all it should go up to the next whole number.