Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Friday, March 30, 2012

Problem with Check Constraints

I am working with an evaluation copy of SQL Server 2000 for the first
time; my DB experience lies with MS Access.

I have a simple table in SQL Server (tblCompany) that has a field
called "Ticker." When new company stock tickers (i.e., MSFT for
Microsoft) are entered into the field, I'd like them in all
caps--whether the user types msft, Msft, MsFt, etc. In Access, this
was easy--simply set the Format to ">" in table design view.

In SQL Server Design Table view, I've clicked on "Manage Constraints"
and put the following code in that I found elsewhere:

([Ticker] = upper([Ticker]))

I then checked all three boxes below: "Check existing data on
creation," "Enforce constraint for replication," and "Enforce
constraint for INSERTs and UPDATEs." The first one, "Check existing
data..." is checked as I've already entered in some data in the field
in lowercase to see if the check constraint would go back and change
it to Upper Case--this because I'm wanting to ultimately migrate a
table from Access to SQL Server and ensure that all Tickers are in
Upper Case.

I'm able to do this and then save the table design with changes; but
every time, I then go and look at the table data to see if the check
constraint was applied, and each time it is not; then, I go back to
"Manage Constraints" and find that the "Check existing data..." box is
unchecked. I've gone through this SEVERAL times.

Hoping this is something simple. Apologize for my "newbieness." I've
got a "For Dummies" book in front of me as well as numerous Internet
windows open, trying to figure this out. Have checked books online on
the MSFT site as well to no avail.

Thanks in advance--

RADA constraint enforces data integrity rules but does not change existing or
newly inserted data. You need to cleanup your data and then add the
constraint to only permit uppercase values going forward.

If you want to automatically change values to upper case as they are entered
on the server side, you'll need to do this in a trigger. IMHO, this task is
better done in application code and let the database just enforce the data
integrity rule.

I don't know the details of the constraint you are adding but be aware that
case sensitivity is determined by collations in SQL 2000. The default
collation is case insensitive so you'll need to override the default
case-insensitive compare in your constraint. The example script below will
correct existing data and add a check constraint to ensure only upper case
values are allowed.

UPDATE Company
SET Ticker = UPPER('Ticker')
GO

ALTER TABLE Company
ADD CONSTRAINT CK_Ticker
CHECK (Ticker COLLATE SQL_Latin1_General_Cp1_CS_AS = UPPER(Ticker))
GO

On a side note, be aware that Hungarian notation (e.g. 'tbl' prefixes) are
frowned upon in client-server database design. The underlying database
implementation (table or view) should be transparent to database users.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"RAD" <rdavenport@.nyc.rr.com> wrote in message
news:d4119d8.0401251017.28f0b46f@.posting.google.co m...
> I am working with an evaluation copy of SQL Server 2000 for the first
> time; my DB experience lies with MS Access.
> I have a simple table in SQL Server (tblCompany) that has a field
> called "Ticker." When new company stock tickers (i.e., MSFT for
> Microsoft) are entered into the field, I'd like them in all
> caps--whether the user types msft, Msft, MsFt, etc. In Access, this
> was easy--simply set the Format to ">" in table design view.
> In SQL Server Design Table view, I've clicked on "Manage Constraints"
> and put the following code in that I found elsewhere:
> ([Ticker] = upper([Ticker]))
> I then checked all three boxes below: "Check existing data on
> creation," "Enforce constraint for replication," and "Enforce
> constraint for INSERTs and UPDATEs." The first one, "Check existing
> data..." is checked as I've already entered in some data in the field
> in lowercase to see if the check constraint would go back and change
> it to Upper Case--this because I'm wanting to ultimately migrate a
> table from Access to SQL Server and ensure that all Tickers are in
> Upper Case.
> I'm able to do this and then save the table design with changes; but
> every time, I then go and look at the table data to see if the check
> constraint was applied, and each time it is not; then, I go back to
> "Manage Constraints" and find that the "Check existing data..." box is
> unchecked. I've gone through this SEVERAL times.
> Hoping this is something simple. Apologize for my "newbieness." I've
> got a "For Dummies" book in front of me as well as numerous Internet
> windows open, trying to figure this out. Have checked books online on
> the MSFT site as well to no avail.
> Thanks in advance--
> RAD|||On 25 Jan 2004 10:17:18 -0800, rdavenport@.nyc.rr.com (RAD) wrote:

>I am working with an evaluation copy of SQL Server 2000 for the first
>time; my DB experience lies with MS Access.
>I have a simple table in SQL Server (tblCompany) that has a field
>called "Ticker." When new company stock tickers (i.e., MSFT for
>Microsoft) are entered into the field, I'd like them in all
>caps--whether the user types msft, Msft, MsFt, etc. In Access, this
>was easy--simply set the Format to ">" in table design view.
>In SQL Server Design Table view, I've clicked on "Manage Constraints"
>and put the following code in that I found elsewhere:
>([Ticker] = upper([Ticker]))
>I then checked all three boxes below: "Check existing data on
>creation," "Enforce constraint for replication," and "Enforce
>constraint for INSERTs and UPDATEs." The first one, "Check existing
>data..." is checked as I've already entered in some data in the field
>in lowercase to see if the check constraint would go back and change
>it to Upper Case--this because I'm wanting to ultimately migrate a
>table from Access to SQL Server and ensure that all Tickers are in
>Upper Case.
>I'm able to do this and then save the table design with changes; but
>every time, I then go and look at the table data to see if the check
>constraint was applied, and each time it is not; then, I go back to
>"Manage Constraints" and find that the "Check existing data..." box is
>unchecked. I've gone through this SEVERAL times.
>Hoping this is something simple. Apologize for my "newbieness." I've
>got a "For Dummies" book in front of me as well as numerous Internet
>windows open, trying to figure this out. Have checked books online on
>the MSFT site as well to no avail.
>Thanks in advance--
>RAD
That doesn't work, as can be shown with

select ticker from tblCompany where ticker = 'MSFT'

Your row will be returned regardless of the case of the data.

this may be something that can be set at the database level,
alternatively use a trigger to uppercase the data.

Something like;

create trigger instblCompany
on tblCompany
instead of insert
as
insert into tblCompany
select upper(ticker), all other columns
from inserted|||Thanks both Dan and Lyndon--I'll give it a whirl.

RAD

Problem with Capital Field names in db and sql statements in small letters

Hi,

I integrated a third-party sw that is apparently used in hundreds of sites into my site. That sw has all field names in (Access) db in capital letters and uses small letters in sql statements in the code and that creates a problem on my site. The third-party sw developers say that this is caused by a false setting on the Web Server so they suggest I change my hosting. I know that if the field names and the sql statements in the code are both capital letters or both small letters everything works.
Does anybody have any idea about how to solve this problem? Is it true that it is a hosting problem? And if so could anybody please tell me how to correct web server setting?

Thanks a lot in advance,
CananWhat errors are you getting? It doesn't sound like a web setting to me. It sounds like typical third-party passing the buck crap.

It sounds like your web hosting company has a case-sensitive version of SQL Server. Either that or Access is case sensitive (not even sure if you can do that)??? :)

I think it's safe to say if it works by correcting the code it's not your webhost though.|||Thanks for your quick response. We found out that after v2.5 of MDAC this problem occurs if the server setting is Turkish. So this was our problem. And Microsoft Support pages suggest we use db field names and the sql statement in the same case to solve this problem if the server has Turkish settings ! We changed the Turkish settings on the server back to English but no luck the problem persisted. So what we did we changed the field names to small letters ! Not a nice way of solving a problem but works out... :)

Thanks again,
Canan

Wednesday, March 28, 2012

Problem with BOF and EOF

I have a adodb connection to a access database and the connection is opened. I want to be able to navigate the records using buttons (first, previous, next and last) and output the data into textboxes. I want to disable the buttons first and previous if BOF is true and next and last if EOF is true.

My problem is that i'm doing the check algorithm when the click event is pressed (set all buttons false, if EOF is false, enabled last and next buttons, if BOF is false, enable first and previous buttons. However, when i test it and click next until it reaches the last record, i have to click it one more time for it to be disabled:

rs a recordset object

Private Function checkRecord() As Boolean

checkRecord = True
tsbLast.Enabled = False
tsbNext.Enabled = False
tsbFirst.Enabled = False
tsbPrevious.Enabled = False
If Not rs.EOF Then
rs.MoveNext()
If Not rs.EOF Then
tsbLast.Enabled = True
tsbNext.Enabled = True
Else
checkRecord = False
End If
rs.MovePrevious()
End If

If Not rs.BOF Then
rs.MovePrevious()
If rs.BOF Then
checkRecord = False
Else
tsbFirst.Enabled = True
tsbPrevious.Enabled = True
End If
rs.MoveNext()
End If

End Function

Is there a cursor location property that returns a integer identifying location of the record? I really hate how BOF and EOF returns true only if the current cursor location is after the last or before the first (its like starting an index at -1, and not 0, and i can't add or subtract from the EOF and BOF indices) or a much more efficient way of doing this?

You might want to look into using the recordset object's AbsolutePosition property. Combined with the Recordcount property, you should be able to determine your current location at all times. Note this depends on the underlying OLEDB provider you are using. For more information please visit http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdproabpos.asp

Regards, Uwa.

|||

Hello,

What I've done in the past with ado to get around this is to create a member variable, called say "_CurrentPosition" that I set to 0 when I first populate the RS, then increment/decrement when MoveN is called. This way, you can just check the _CurrentPosition variable to achieve what you want:

if (CurrentPosition == rs.RecordCount)

{

// disable move next button etc

}

else if (CurrentPosition = 0) //or 1 if you didn't create it as zero-based!

{

// disable move first button etc

}

I know it's not exactly what you're after, but there is no native property/method that ado exposes. As you may have discovered, the EndOfRecordset event fires only after you attempt to move beyong EOF...

Cheers,

Rob

|||

Hello,

Just seconding what Uwa said: be careful using the AbsolutePosition property as this is provider dependent and I have never been able to utilise it with any degree of confidence.

Cheers,

Rob

|||You can try using ADO Data Control. You can find an example at - http://www.devarticles.com/c/a/Visual-Basic/Implementing-An-ADO-Data-Control-With-VB6/|||Thanks for all the replies, it seems that using OleDB as the provider instead of ADODB would make the most sense. It is a bit more coding, but not enough to persuade me to mess with ADO

Monday, March 26, 2012

Problem with attached view

I write you because I have a big problem with request access : when
I use a sql server wiev in access (attached view) and i join it with
a local access table, the sql server trace say sql server send all
the data of the view to a access . This view have 15 000 000 rows
When i do the same with an sql server table (attached table) , i
have a very fast answer. every data of the local table is send to
sqlserver (exec sp_execute 1, N'205513214066535435'), why it doesn't
happen this with the view.
there is no difference between the table and the view.
my table is :dbo.table
my view is : create view vtable as select * from dbo.table
Hi
Show us the code you use to call the view.
Where is the where clause?
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"toni" <toni@.discussions.microsoft.com> wrote in message
news:2282D883-62D2-4810-9442-418C36148C9C@.microsoft.com...
> I write you because I have a big problem with request access : when
> I use a sql server wiev in access (attached view) and i join it
> with
> a local access table, the sql server trace say sql server send all
> the data of the view to a access . This view have 15 000 000 rows
> When i do the same with an sql server table (attached table) , i
> have a very fast answer. every data of the local table is send to
> sqlserver (exec sp_execute 1, N'205513214066535435'), why it
> doesn't
> happen this with the view.
> there is no difference between the table and the view.
> my table is :dbo.table
> my view is : create view vtable as select * from dbo.table
|||Hello,
The local acces table have one field id
The linked view sqlserver_view
The linked table sqlserver_table
in access the request is:
SELECT *
FROM sqlserver_view.view INNER JOIN local_acces.table ON
local_acces.table.id = sqlserver_view.view.id
All the datat of the view are send (odbc error after many minutes)
the trace give :
sqlbatchcompleted
SELECT *FROM sqlserver_view.view
when i do the same with the linked table sqlserver_table.table
SELECT *
FROM sqlserver_table.table INNER JOIN local_acces.table ON
local_acces.table.id = sqlserver_table.table.id
the data are send immediatly
the trace give
rpc.completed
declare @.P1 int
set @.P1=1
exec sp_prepexec @.P1 output, N'@.P1 nvarchar(20)', N'SELECT
*FROMsqlserver_table.table WHERE ("Carte_SAM" = @.P1)', N'453335736479610200'
select @.P1
Sorry , I don't speak a very good english because I'm spanish
regards
"Mike Epprecht (SQL MVP)" wrote:

> Hi
> Show us the code you use to call the view.
> Where is the where clause?
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "toni" <toni@.discussions.microsoft.com> wrote in message
> news:2282D883-62D2-4810-9442-418C36148C9C@.microsoft.com...
>
>
|||The linked view sqlserver_view
The linked table sqlserver_table
and
the sqlserver_view is
create view dbo. sqlserver_view
as
select
*
from
dbo. sqlserver_table
regards
"toni" wrote:
[vbcol=seagreen]
> Hello,
> The local acces table have one field id
> The linked view sqlserver_view
> The linked table sqlserver_table
> in access the request is:
> SELECT *
> FROM sqlserver_view.view INNER JOIN local_acces.table ON
> local_acces.table.id = sqlserver_view.view.id
> All the datat of the view are send (odbc error after many minutes)
> the trace give :
> sqlbatchcompleted
> SELECT *FROM sqlserver_view.view
> when i do the same with the linked table sqlserver_table.table
> SELECT *
> FROM sqlserver_table.table INNER JOIN local_acces.table ON
> local_acces.table.id = sqlserver_table.table.id
> the data are send immediatly
> the trace give
> rpc.completed
> declare @.P1 int
> set @.P1=1
>
> exec sp_prepexec @.P1 output, N'@.P1 nvarchar(20)', N'SELECT
> *FROMsqlserver_table.table WHERE ("Carte_SAM" = @.P1)', N'453335736479610200'
> select @.P1
>
> Sorry , I don't speak a very good english because I'm spanish
>
>
>
> regards
> "Mike Epprecht (SQL MVP)" wrote:
|||The view haven't clause where, it's a simply select * from the table
"toni" wrote:
[vbcol=seagreen]
> The linked view sqlserver_view
> The linked table sqlserver_table
> and
> the sqlserver_view is
> create view dbo. sqlserver_view
> as
> select
> *
> from
> dbo. sqlserver_table
>
> regards
>
>
> "toni" wrote:

Problem with ASP

Hello,
I know this group doesn't pertain to Active Server Script, but I didn't see
a group for that and though the SQL and Access people would be better suited
to help me, since many have exerience with ASP scripting.
I have Active Server pages which write data to an Access database. On a
test page I set the DSN to an SQL server table that I created. I would
assume it should run without a problem, but the page hangs up and I get a
message:
The page cannot be displayed
All I can think is that there is something about the SQL Database which will
require some rewriting. For example in the past when I modified a database
to read SQL Server tables I had to add the property, dbSeeChanges to the
OpenRecordSet method.
I am wondering if there is something similar that I am unaware of which is
making the page hang. I suspect the problem to be in the query insert query
named, "q".
I put the whole procedure below.
Thanks for any help and God Bless,
Mark A. Sam
<%
dim company
dim coid
dim contact
dim address1
dim address2
dim city
dim state
dim zip
dim country
dim phone
dim email
dim key
dim displayemail
dim displayphone
dim trucker
dim shipper
dim truckbroker
dim foodbroker
dim manufacturer
dim merchandiser
dim distributor
dim ltlcarrier
dim othertype
dim trknounits
dim trkstates
dim trkreefer
dim trkvan
dim trkflatbed
dim trkdumptruck
dim trkother
dim shploads
dim shpstates
dim shpreefer
dim shpvan
dim shpflatbed
dim shpdumptruck
dim shpother
dim comments
Dim howsitefound
Function prepare(str)
prepare = Replace(Replace(str,"'", "`"),Chr(34), """)
End Function
Sub getfields()
alert('debug');
company = prepare(Request.Form("company"))
contact = prepare(Request.Form("contact"))
address1 = prepare(Request.Form("address1"))
address2 = prepare(Request.Form("address2"))
city = prepare(Request.Form("city"))
state = prepare(Request.Form("state"))
zip = Request.Form("zip")
country = prepare(Request.Form("country"))
phone = Request.Form("phone")
email = Request.Form("email")
key = prepare(Request.Form("key"))
displayemail = Request.Form("displayemail")
displayphone = Request.Form("displayphone")
if Request.Form("trucker") = "" then
trucker = FALSE
else
trucker = TRUE
end if
if Request.Form("trucker") = "" then
trucker = FALSE
else
trucker = TRUE
end if
if Request.Form("shipper") = "" then
shipper = FALSE
else
shipper = TRUE
end if
if Request.Form("truckbroker") = "" then
truckbroker = FALSE
else
truckbroker = TRUE
end if
if Request.Form("foodbroker") = "" then
foodbroker = FALSE
else
foodbroker = TRUE
end if
if Request.Form("manufacturer") = "" then
manufacturer = FALSE
else
manufacturer = TRUE
end if
if Request.Form("merchandiser") = "" then
merchandiser = FALSE
else
merchandiser = TRUE
end if
if Request.Form("distributor") = "" then
distributor = FALSE
else
distributor = TRUE
end if
if Request.Form("ltlcarrier") = "" then
ltlcarrier = FALSE
else
ltlcarrier = TRUE
end if
othertype = prepare(Request.Form("othertype"))
trknounits = Request.Form("trknounits")
if trknounits = "" then trknounits = "0"
trkstates = Request.Form("trkstates")
if trkstates = "" then trkstates = "0"
if Request.Form("trkreefer") = "" then
trkreefer = FALSE
else
trkreefer = TRUE
end if
if Request.Form("trkvan") = "" then
trkvan = FALSE
else
trkvan = TRUE
end if
if Request.Form("trkflatbed") = "" then
trkflatbed = FALSE
else
trkflatbed = TRUE
end if
if Request.Form("trkdumptruck") = "" then
trkdumptruck = FALSE
else
trkdumptruck = TRUE
end if
trkother = Request.Form("trkother")
shploads = Request.Form("shploads")
if shploads = "" then shploads = "0"
shpstates = Request.Form("shpstates")
if shpstates = "" then shpstates = "0"
if Request.Form("shpreefer") = "" then
shpreefer = FALSE
else
shpreefer = TRUE
end if
if Request.Form("shpvan") = "" then
shpvan = FALSE
else
shpvan = TRUE
end if
if Request.Form("shpflatbed") = "" then
shpflatbed = FALSE
else
shpflatbed = TRUE
end if
if Request.Form("shpdumptruck") = "" then
shpdumptruck = FALSE
else
shpdumptruck = TRUE
end if
howsitefound = prepare(Request.Form("howsitefound"))
shpother = prepare(Request.Form("shpother"))
comments = prepare(Request.Form("comments"))
End Sub
if Request("mode") = "NEW" then
getfields()
Set rs = Server.CreateObject("ADODB.RecordSet")
q = "INSERT INTO CompanyInfo (Company,Contact,Address1,Address2," &_
" City,State,Zip,Country,Phone,Email,Key,D
isplayEmail,DisplayPhone," &_
" Trucker,Shipper,TruckBroker,FoodBroker,M
anufacturer,Merchandiser," &_
" Distributor,LTLCarrier,OtherType,trkNoUn
its,trkStates,trkReefer,trkVan,"
&_
" trkFlatBed,trkDumpTruck,trkOther,shpLoad
s," &_
" shpStates,shpReefer,shpVan,shpFlatbed,sh
pDumpTruck,shpOther,Comments,Active
,howsitefound)" &_
" VALUES ('" & company & "','" & contact & "','" & address1 & "','" &
address2 &_
"','" & city & "','" & state & "','" & zip & "','" & country & "','" &
phone &_
"','" & email & "','" & key & "','" & displayemail & "','" & displayphone
&_
"'," & trucker & "," & shipper & "," & truckbroker & "," & foodbroker &
"," &_
manufacturer & "," & merchandiser & "," & distributor & "," & ltlcarrier
&_
",'" & othertype & "'," & trknounits & "," & trkstates & "," & trkreefer
&_
"," & trkvan & "," & trkflatbed & "," & trkdumptruck & ",'" & trkother &
"'," &_
shploads & "," & shpstates & "," & shpreefer & "," & shpvan & "," &
shpflatbed &_
"," & shpdumptruck & ",'" & shpother & "','" & comments & "',1,'" &
howsitefound & "')"
rs.Open q, "DSN=TruckLoadsDevSQL;"
q = "SELECT Max(CompanyID) AS coid FROM CompanyInfo"
rs.Open q, "DSN=TruckLoadsDevSQL;"
coid = rs("coid").value
Response.Cookies("coid") = coid
Response.Cookies("key") = key
d = Date
Response.Cookies("coid").expires = DateAdd("yyyy", 2, d)
Response.Cookies("key").expires = DateAdd("yyyy", 2, d)
mess = "Your Record has been added to the database. Your Company ID number
is " &_
coid & ". Your password is " & key & ". Please write them down. " &_
"You may edit your record now, if you wish"
rs.Close
Set rs = Nothing
' if UCase(Request.ServerVariables("SERVER_NAME")) <> "ANGELA" then
' Set JMail = Server.CreateObject("JMail.SMTPMail")
' JMail.ServerAddress = "mail.truckloads.net:25"
' JMail.Sender = "msam@.plan-it-earth.net"
' JMail.Subject = "Your Company Registration With www.truckloads.net"
' JMail.AddRecipient email
' Body = "Dear " & contact & VbCrLf & VbCrLf &_
' "Thank you for registering your company with www.truckloads.net! " &
VbCrLf & VbCrLf &_
' "Your Company ID is " & coid & VbCrLf &_
' "Your Password is " & key & VbCrLf & VbCrLf &_
' "These have been stored in a cookie on your computer for ease of use.
However, " &_
' "if the cookie is deleted, or for some other reason you need to look up
your " &_
' "Company ID and Password, please keep this email for future reference. "
& VbCrLf & VbCrLf &_
' "Thanks again, " & VbCrLf & VbCrLf &_
' "Mark A. Sam, Plan-It-Earth Web Management Services" & VbCrLf &_
' "msam@.plan-it-earth.net"
'
' JMail.Body = Body
' JMail.Priority = 3
'
' JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
'' JMail.Execute
'
' JMail.Subject = "New Company Registration With www.truckloads.net"
' JMail.AddRecipient "msam@.plan-it-earth.net"
' JMail.AddRecipient "takempis@.roanoke.infi.net"
' Body = "Dear Mark,"& VbCrLf & VbCrLf &_
' "The following company has registered with www.truckloads.net:" & VbCrLf
& VbCrLf &_
' "Company: " & company & VbCrLf &_
' "Contact Name: " & contact & VbCrLf &_
' "Address1: " & address1 & VbCrLf &_
' "Address2: " & address2 & VbCrLf &_
' "City: " & city & VbCrLf &_
' "State: " & state & VbCrLf &_
' "Zip: " & zip & VbCrLf &_
' "Country: " & country & VbCrLf &_
' "Phone: " & phone & VbCrLf &_
' "Email: " & email & VbCrLf &_
' "Company ID:" & coid & VbCrLf &_
' "Password:" & key
' JMail.Body = Body
' JMail.Priority = 3
'
' JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")
'' JMail.Execute
' Set JMail = Nothing
' end if
elseif Request.Form("mode") = "DELETE" then
Set rs = Server.CreateObject("ADODB.RecordSet")
q = "DELETE FROM CompanyInfo WHERE CompanyID =" & Request.Form("coid")
rs.Open q, "DSN=TruckLoadsDevSQL;"
Session("mess") = "Your Record has been deleted. You may enter another if
you wish."
Response.Cookies("coid") = ""
Response.Cookies("key") = ""
Response.Redirect "companyinfo.asp"
elseif Request.Form("mode") = "UPDATE" then
getfields()
coid = Request.Form("coid")
Set rs = Server.CreateObject("ADODB.RecordSet")
q = "UPDATE CompanyInfo SET Company='" & company & "',Contact = '" &
contact &_
"', Address1 = '" & address1 & "', Address2 = '" & address2 &_
"', City ='" & city & "', State = '" & state & "', Zip = '" & zip &_
"',Country = '" & country & "', Phone = '" & phone & "', Email = '" &_
email & "', Key = '" & key & "', DisplayEmail = '" & displayemail &_
"', DisplayPhone = '" & displayphone & "', Trucker = " & trucker &_
", Shipper = " & shipper & ", TruckBroker = " & truckbroker & ",
FoodBroker = " &_
foodbroker & ", Manufacturer = " & manufacturer & ", Merchandiser = " &_
merchandiser & ", Distributor = " & distributor & ", LTLCarrier = " &_
ltlcarrier & ", OtherType = '" & othertype & "', trkNoUnits = " &
trknounits &_
", trkStates = " & trkstates & ", trkReefer = " & trkreefer & ", trkVan =
" &_
trkvan & ", trkFlatbed = " & trkflatbed & ",trkDumpTruck = " &
trkdumptruck &_
",trkOther = '" & trkother & "', shpLoads = " & shploads & ", shpStates =
" &_
shpstates & ", shpReefer = " & shpreefer & ", shpVan = " & shpvan &_
", shpFlatbed = " & shpflatbed & ", shpDumpTruck = " & shpdumptruck &_
", shpOther = '" & shpother & "', Comments = '" & comments & "' WHERE
CompanyID = " &_
Request.Form("coid")
rs.Open q, "DSN=TruckLoadsDevSQL;"
Response.Cookies("coid") = coid
Response.Cookies("key") = key
d = Date
Response.Cookies("coid").expires = DateAdd("yyyy", 2, d)
Response.Cookies("key").expires = DateAdd("yyyy", 2, d)
mess = "Your Record has been updated."
Set rs = Nothing
elseif Request("mode") = "KEY" then
coid = Request("coid")
key = Request("key")
Set rs = Server.CreateObject("ADODB.RecordSet")
q = "SELECT * FROM CompanyInfo WHERE CompanyID = " & coid &_
" AND Key LIKE '" & key & "'"
rs.Open q, "DSN=TruckLoadsDevSQL;"
if rs.EOF then
Session("mess") = "Sorry. Your Company ID and/or password were not found.
Try again?"
Response.Redirect "companykey.asp"
end if
company = prepare(rs("Company").value)
contact = prepare(rs("Contact").value)
address1 = prepare(rs("Address1").value)
address2 = prepare(rs("Address2").value)
city = prepare(rs("City").value)
state = prepare(rs("State").value)
zip = rs("Zip").value
country = prepare(rs("Country").value)
phone = rs("Phone").value
email = rs("Email").value
key = prepare(rs("Key").value)
displayemail = rs("DisplayEmail").value
displayphone = rs("DisplayPhone").value
trucker = rs("Trucker").value
shipper = rs("Shipper").value
truckbroker = rs("TruckBroker").value
foodbroker = rs("FoodBroker").value
manufacturer = rs("Manufacturer").value
merchandiser = rs("Merchandiser").value
distributor = rs("Distributor").value
ltlcarrier = rs("LTLCarrier").value
othertype = prepare(rs("OtherType").value)
trknounits = rs("trkNoUnits").value
if trknounits = "" then trknounits = "0"
trkstates = rs("trkStates").value
if trkstates = "" then trkstates = "0"
trkreefer = rs("trkReefer").value
trkvan = rs("trkVan").value
trkflatbed = rs("trkFlatBed").value
trkdumptruck = rs("trkDumpTruck").value
trkother = rs("trkOther").value
shploads = rs("shpLoads").value
if shploads = "" then shploads = "0"
shpstates = rs("shpStates").value
if shpstates = "" then shpstates = "0"
shpreefer = rs("shpReefer").value
shpvan = rs("shpVan").value
shpflatbed = rs("shpFlatBed").value
shpdumptruck = rs("shpDumpTruck").value
shpother = prepare(rs("shpOther").value)
comments = prepare(rs("Comments").value)
Response.Cookies("coid") = coid
Response.Cookies("key") = key
d = Date
Response.Cookies("coid").expires = DateAdd("yyyy", 2, d)
Response.Cookies("key").expires = DateAdd("yyyy", 2, d)
end if
%>
<html>
<head>
<meta NAME="keywords"
CONTENT="Truckloads. NET,Loads,Load,Loading,Frieght,Freight,T
ruckers,Trucker,
Trucking,Shipper,Shippers,Shipping,Reefe
rs,Reefer,Vans,Dry Vans,Van,Dry
Van,Haul,Hauling,Backhaul,Backhauls,LTL,
TruckStop,TruckStops,Cash
Advance,Cach Advances,Rig,Rigs,Manufacturing,UPS,Fede
ral
Express,Airborne,Agriculture,Produce,Cab
bage,Tomatoes,Fruit,Vegetables,Apple
s,Peaches,Newsprint,Commodities,Potatoes
,Nursery Stock">
<meta NAME="description"
CONTENT="List and Find Trucks and loads. This service is for any person or
company that utilizes trucks for hauling merchandise. This is a listing
service open to Truckers, Shippers, and Brokers. Registration is required
for posting to the site. Searches are open to anyone">
<meta NAME="Author"
CONTENT="Mark A. Sam 716-679-7607 msam@.plan-it-earth.net Plan-It-Earth Web
Management Services Box 110 Dunkirk, NY 14048 716-679-7607">
<title>Edit Your Company Information</title>
<meta name="Microsoft Border" content="tb">
</head>
<body leftmargin="0" topmargin="0" background="../images/trucksbg.gif"
bgcolor="#FFFFFF"
link="#000080" vlink="#800080" alink="#000080">
<p><script language="JavaScript"><!--
<%if mess <> "" then%>
alert("<%=mess%>");
<%end if%>
// --></script> <script LANGUAGE="JavaScript">
<!--
function delconfirm(theForm) {
if(confirm("Are you sure you want to delete your record?")) return (true);
return(false);
}
// -->
</script> <u><font
size="4"><strong><script LANGUAGE="JavaScript">
<!--
function Validate(theForm)
{
if (theForm.company.value == "")
{
alert("Please enter a value for the \"Company Name\" field.");
theForm.company.focus();
return (false);
}
if (theForm.company.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Company Name\"
field.");
theForm.company.focus();
return (false);
}
if (theForm.contact.value == "")
{
alert("Please enter a value for the \"Contact Name\" field.");
theForm.contact.focus();
return (false);
}
if (theForm.contact.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Contact Name\"
field.");
theForm.contact.focus();
return (false);
}
if (theForm.address1.value == "")
{
alert("Please enter a value for the \"Address Line 1\" field.");
theForm.address1.focus();
return (false);
}
if (theForm.address1.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Address Line 1\"
field.");
theForm.address1.focus();
return (false);
}
if (theForm.city.value == "")
{
alert("Please enter a value for the \"City\" field.");
theForm.city.focus();
return (false);
}
if (theForm.city.value.length > 50)
{
alert("Please enter at most 50 characters in the \"City\" field.");
theForm.city.focus();
return (false);
}
if (theForm.state.value == "")
{
alert("Please enter a value for the \"State\" field.");
theForm.state.focus();
return (false);
}
if (theForm.state.value.length > 50)
{
alert("Please enter at most 50 characters in the \"State\" field.");
theForm.state.focus();
return (false);
}
if (theForm.zip.value == "")
{
alert("Please enter a value for the \"Postal Code\" field.");
theForm.zip.focus();
return (false);
}
if (theForm.zip.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Postal Code\"
field.");
theForm.zip.focus();
return (false);
}
if (theForm.country.value == "")
{
alert("Please enter a value for the \"Country\" field.");
theForm.country.focus();
return (false);
}
if (theForm.country.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Country\" field.");
theForm.country.focus();
return (false);
}
if (theForm.phone.value == "")
{
alert("Please enter a value for the \"Phone\" field.");
theForm.phone.focus();
return (false);
}
if (theForm.phone.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Phone\" field.");
theForm.phone.focus();
return (false);
}
if (theForm.email.value == "")
{
alert("Please enter a value for the \"Email Address\" field.");
theForm.email.focus();
return (false);
}
if (theForm.email.value.length > 50)
{
alert("Please enter at most 50 characters in the \"Email Address\"
field.");
theForm.email.focus();
return (false);
}
if (theForm.key.value == "")
{
alert("Please enter a value for the \"Password\" field.");
theForm.key.focus();
return (false);
}
if (theForm.key.value.length < 6)
{
alert("Please enter at least 6 characters in the \"Password\" field.");
theForm.key.focus();
return (false);
}
if (theForm.key.value.length > 12)
{
alert("Please enter at most 12 characters in the \"Password\" field.");
theForm.key.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.trknounits.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit characters in the \"Trucker - Number of
Units that you run\" field.");
theForm.trknounits.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.trkstates.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit characters in the \"Trucker - Number of
States that you cover\" field.");
theForm.trkstates.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.shploads.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit characters in the \"Shipper- Number of
Loads that you ship per w\" field.");
theForm.shploads.focus();
return (false);
}
var checkOK = "0123456789-";
var checkStr = theForm.shpstates.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
allNum += ch;
}
if (!allValid)
{
alert("Please enter only digit characters in the \"Shipper- Number of
States that you ship to\" field.");
theForm.shpstates.focus();
return (false);
}
var done = 0;
if(theForm.trucker.checked == (true)) done = 1;
if(theForm.shipper.checked == (true)) done = 1;
if(theForm.truckbroker.checked == (true)) done = 1;
if(theForm.foodbroker.checked == (true)) done = 1;
if(theForm.manufacturer.checked == (true)) done = 1;
if(theForm.merchandiser.checked == (true)) done = 1;
if(theForm.distributor.checked == (true)) done = 1;
if(theForm.ltlcarrier.checked == (true)) done = 1;
if(theForm.othertype.value != "") done = 1;
if(done == 0) {
alert("You must choose at least one Company Type.");
theForm.trucker.focus();
return (false);
}
return (true);
}
// -->
</script> </strong></font></u></p>
<table width="653" cellpadding="10" align="LEFT" valign="TOP">
<tr>
<!-- Button Column -->
<td width="150" align="LEFT" valign="TOP"><a
href="../asp/searchloads.asp">
<img
src="../ImagesButtons/searchloads.jpg" alt border="0"></a><a
href="../asp/searchtrucks.asp"><img
src="../ImagesButtons/searchtrucks.jpg" alt border="0"></a><a
href="../information/information.asp"><img
src="../ImagesButtons/information.jpg" alt border="0"></a> </td>
<!-- Content column -->
<td align="LEFT" valign="TOP" width="457"><table border="0"
width="100%">
<tr>
<td width="100%"><p align="center"><font size="4"><strong>Edit Your
Company Information</strong></font></p>
<table border="0" width="100%">
<tr>
<td align="left" valign="top"><a
href="truckinfo.asp?mode=EDIT&coid=<%=coid%>&key=<%=key%>"><img
src="../images/EnterTrucks.gif" alt="Enter Your Trucks"
align="left" border="0"></a></td>
<td align="left" valign="top"><a
href="loadinfo.asp?mode=EDIT&coid=<%=coid%>&key=<%=key%>"><img
src="../images/EnterLoads.gif" alt="Enter Your Load"
align="left" border="0"></a></td>
<td align="left" valign="top"><a
href="listing.asp?company=<%=Server.URLEncode(company)%>&coid=<%=coid%>"
><strong>Edit/
Delete Trucks or Loads</strong></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<p align="center"><b><span lang="en-us"><font face="Arial">
<font color="#FF0000">We would like you to take a survey for a new
service to help you get more business.</font><br>
<a target="_blank"
href="http://www.Plan-It-Earth.Net/TLOSurvey/Default.htm">
Click Here</a></font></span></b></td>
</tr>
</table>
<p align="left"><strong><font color="#800000">Please check the
information you submitted
and fix any errors!</font><br>
Fields with a <font size="5" color="#FF0000">*</font> are required<span
lang="en-us">
<font color="#800000"><span style="background-color:
#FFFF00">$$$$</span></font></span></strong></p>
<form ACTION="companyedit.asp" METHOD="POST" ONSUBMIT="return
Validate(this)">
<input type="hidden" name="coid" value="<%=coid%>"><input
type="hidden" name="mode"
value="UPDATE"><table border="0" width="100%">
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Company
Name</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=company%>"
SIZE="35" ID="fp3"
NAME="company" maxlength="50"> <br>
<font size="1" face="Arial">( 0r Your Name )</font></strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Contact
Name</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=contact%>"
SIZE="35" ID="fp3"
NAME="contact" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Address
Line 1</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=address1%>"
SIZE="35" ID="fp3"
NAME="address1" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong>Address Line
2</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=address2%>"
SIZE="35" ID="fp3"
NAME="address2" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>City</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=city%>"
SIZE="35" ID="fp3"
NAME="city" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>State</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=state%>"
SIZE="35" ID="fp3"
NAME="state" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Postal
Code</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=zip%>"
SIZE="35" ID="fp3" NAME="zip"
maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Country</strong></td>
<td width="70%" valign="top"><strong><input VALUE="USA" SIZE="35"
ID="fp3" NAME="country"
maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Phone</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=phone%>"
SIZE="35" ID="fp3"
NAME="phone" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Email
Address</strong></td>
<td width="70%" valign="top"><strong><input VALUE="<%=email%>"
SIZE="35" ID="fp3"
NAME="email" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Select
a Password</strong></td>
<td width="70%" valign="top"><strong><font color="#000000"><input
VALUE="<%=key%>"
SIZE="12" ID="fp10" NAME="key"> <br>
</font><font color="#000000" size="1" face="Arial">( 6 - 12
characters )</font></strong></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="top"><strong>Type a Phone and
Email Address you wish
to be <em>displayed</em> with your transactions.</strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong>Email
Address</strong></td>
<td width="70%" valign="top"><strong><input
VALUE="<%=displayemail%>" SIZE="35" ID="fp3"
NAME="displayemail" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font size="5"
color="#FF0000">*</font>Phone</strong></td>
<td width="70%" valign="top"><strong><input
VALUE="<%=displayphone%>" SIZE="35" ID="fp3"
NAME="displayphone" maxlength="50"> </strong></td>
</tr>
<tr>
<td width="100%" colspan="2" bgcolor="#C0C0C0"
height="1" valign="top"></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="top"><strong><font size="5"
color="#FF0000">*</font>Type
of company (Check <font color="#800000">at least one</font>, and
check all that apply):<br>
</strong><input TYPE="checkbox" <%if trucker = TRUE then%> checked
<%end if%> VALUE="ON"
ID="fp16" NAME="trucker"> <strong><label
for="fp16">Trucker</label><br>
<input TYPE="checkbox" <%if shipper = TRUE then%> checked <%end
if%> VALUE="ON" ID="fp17"
NAME="shipper"> <label for="fp17">Shipper</label><br>
<input TYPE="checkbox" <%if truckbroker = TRUE then%> checked
<%end if%> VALUE="ON"
ID="fp18" NAME="truckbroker"> <label for="fp18">Truck
Broker</label><br>
<input TYPE="checkbox" <%if foodbroker = TRUE then%> checked <%end
if%> VALUE="ON"
ID="fp19" NAME="foodbroker"> <label for="fp19">Food
Broker</label><br>
<input TYPE="checkbox" <%if manufacturer = TRUE then%> checked
<%end if%> VALUE="ON"
ID="fp20" NAME="manufacturer"> <label
for="fp20">Manufacturer</label><br>
<input TYPE="checkbox" <%if merchandiser = TRUE then%> checked
<%end if%> VALUE="ON"
ID="fp21" NAME="merchandiser"> <label
for="fp21">Mechandiser</label><br>
<input TYPE="checkbox" <%if distributor = TRUE then%> checked
<%end if%> VALUE="ON"
ID="fp22" NAME="distributor"> <label
for="fp22">Distributor</label><br>
<input TYPE="checkbox" <%if ltlcarrier = TRUE then%> checked <%end
if%> VALUE="ON"
ID="fp23" NAME="ltlcarrier"> <label for="fp23">LTL
Carrier</label><br>
Other Type <input VALUE="<%=othertype%>" SIZE="50" ID="fp24"
NAME="othertype"
maxlength="50"> </strong></td>
</tr>
<tr>
<td width="100%" colspan="2" bgcolor="#C0C0C0"
height="1" valign="top"></td>
</tr>
<tr>
<td width="100%" colspan="2" valign="top"><strong>Please supply
the following Information
(Not required)</strong></td>
</tr>
<tr>
<td width="30%" valign="top"><font
color="#400000"><strong>Truckers</strong></font></td>
<td width="70%" valign="top"></td>
</tr>
<tr>
<td width="30%" valign="top"><font
color="#0000a0"><strong>Number of units
that you run</strong></font></td>
<td width="70%" valign="top"><input VALUE="<%=trknounits%>"
SIZE="6" NAME="trknounits"> </td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font
color="#0000a0">Number of states
that you cover</font></strong></td>
<td width="70%" valign="top"><input VALUE="<%=trkstates%>"
SIZE="6" NAME="trkstates"> </td>
</tr>
<tr>
<td width="100%" colspan="2" valign="top"><strong><font
color="#0000a0">Type of trucks </font></strong><input
TYPE="checkbox" <%if trkreefer = TRUE then%> checked <%end if%>
VALUE="ON" ID="fp11"
NAME="trkreefer"> <label for="fp11">Reefers</label> <input
TYPE="checkbox"
<%if trkvan = TRUE then%> checked <%end if%> VALUE="ON" ID="fp12"
NAME="trkvan"> <label
for="fp12">Vans</label> <input TYPE="checkbox" <%if trkflatbed =
TRUE then%> checked
<%end if%> VALUE="ON" ID="fp13" NAME="trkflatbed"> <label
for="fp13">Flatbeds</label> <input
TYPE="checkbox" <%if trkdumptruck = TRUE then%> checked <%end if%>
VALUE="ON" ID="fp14"
NAME="trkdumptruck"> <label for="fp14">Dump Trucks</label> <br>
<font color="#0000A0"><strong>Other Type</strong></font>
<strong><input
VALUE="<%=trkother%>" SIZE="50" ID="fp24" NAME="trkother"
maxlength="50"> </strong></td>
</tr>
<tr>
<td width="100%" colspan="2" bgcolor="#C0C0C0" height="1"
valign="top"></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font
color="#400000">Shippers</font></strong></td>
<td width="70%" valign="top"></td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font
color="#0000a0">Number of loads<br>
that you ship per w</font></strong></td>
<td width="70%" valign="top"><input VALUE="<%=shploads%>" SIZE="6"
NAME="shploads"> </td>
</tr>
<tr>
<td width="30%" valign="top"><strong><font
color="#0000a0">Number of states
that you ship to</font></strong></td>
<td width="70%" valign="top"><input VALUE="<%=shpstates%>"
SIZE="6" NAME="shpstates"> </td>
</tr>
<tr>
<td width="100%" colspan="2" valign="top"><strong><font
color="#0000a0">Type of trucks
needed </font></strong><input TYPE="checkbox" <%if shpreefer =
TRUE then%> checked
<%end if%> VALUE="ON" ID="fp11" NAME="shpreefer"> <label
for="fp11">Reefers</label> <input
TYPE="checkbox" <%if shpvan = TRUE then%> checked <%end if%>
VALUE="ON" ID="fp12"
NAME="shpvan"> <label for="fp12">Vans</label> <input
TYPE="checkbox"
<%if shpflatbed = TRUE then%> checked <%end if%> VALUE="ON"
ID="fp13" NAME="shpflatbed"> <label
for="fp13">Flatbeds</label> <input TYPE="checkbox" <%if
shpdumptruck = TRUE then%> checked
<%end if%> VALUE="ON" ID="fp14" NAME="shpdumptruck"> <label
for="fp14">Dump Trucks</label>
<br>
<font color="#0000A0"><strong>Other Type</strong></font>
<strong><input
VALUE="<%=shpother%>" SIZE="50" ID="fp24" NAME="shpother"
maxlength="50"> </strong></td>
</tr>
<tr>
<td width="100%" colspan="2" bgcolor="#C0C0C0"
height="1" valign="top"></td>
</tr>
<tr>
<td width="30%"
valign="top"><strong>Comments</strong></td>
<td width="70%" valign="top"><label for="fp1"><strong><font
color="#ffffff"><textarea
ROWS="6" COLS="35" NAME="comments"><%=comments%>
</textarea></font></strong></label></td>
</tr>
<tr>
<td width="30%" valign="top"><input TYPE="submit" VALUE="Update"
NAME="Submitted"> </td>
<td width="70%" valign="top"><input TYPE="reset" VALUE="Reset"
NAME="B2"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</html>Hi
Without wading through your asp.. you may want to see what is being sent to
your server by using SQL Profiler. You can then cut and paste the commands
into query analyser so you can then check them for errors.
I assume this works against your access database, there are some slight
differences between the SQL symantics for the two.
Books online is a welth of information regarding T-SQL and SQL server. You
can download the latest version at
http://www.microsoft.com/downloads/...&displaylang=en
For ASP this is also a valueable resource http://www.aspfaq.com/categories.as...asp?frame=true
John
"Mark A. Sam" wrote:

> Hello,
> I know this group doesn't pertain to Active Server Script, but I didn't se
e
> a group for that and though the SQL and Access people would be better suit
ed
> to help me, since many have exerience with ASP scripting.
> I have Active Server pages which write data to an Access database. On a
> test page I set the DSN to an SQL server table that I created. I would
> assume it should run without a problem, but the page hangs up and I get a
> message:
> The page cannot be displayed
> All I can think is that there is something about the SQL Database which wi
ll
> require some rewriting. For example in the past when I modified a databas
e
> to read SQL Server tables I had to add the property, dbSeeChanges to the
> OpenRecordSet method.
> I am wondering if there is something similar that I am unaware of which is
> making the page hang. I suspect the problem to be in the query insert que
ry
> named, "q".
> I put the whole procedure below.
> Thanks for any help and God Bless,
> Mark A. Sam
>
> <%
> dim company
> dim coid
> dim contact
> dim address1
> dim address2
> dim city
> dim state
> dim zip
> dim country
> dim phone
> dim email
> dim key
> dim displayemail
> dim displayphone
> dim trucker
> dim shipper
> dim truckbroker
> dim foodbroker
> dim manufacturer
> dim merchandiser
> dim distributor
> dim ltlcarrier
> dim othertype
> dim trknounits
> dim trkstates
> dim trkreefer
> dim trkvan
> dim trkflatbed
> dim trkdumptruck
> dim trkother
> dim shploads
> dim shpstates
> dim shpreefer
> dim shpvan
> dim shpflatbed
> dim shpdumptruck
> dim shpother
> dim comments
> Dim howsitefound
> Function prepare(str)
> prepare = Replace(Replace(str,"'", "`"),Chr(34), """)
> End Function
> Sub getfields()
> alert('debug');
> company = prepare(Request.Form("company"))
> contact = prepare(Request.Form("contact"))
> address1 = prepare(Request.Form("address1"))
> address2 = prepare(Request.Form("address2"))
> city = prepare(Request.Form("city"))
> state = prepare(Request.Form("state"))
> zip = Request.Form("zip")
> country = prepare(Request.Form("country"))
> phone = Request.Form("phone")
> email = Request.Form("email")
> key = prepare(Request.Form("key"))
> displayemail = Request.Form("displayemail")
> displayphone = Request.Form("displayphone")
> if Request.Form("trucker") = "" then
> trucker = FALSE
> else
> trucker = TRUE
> end if
> if Request.Form("trucker") = "" then
> trucker = FALSE
> else
> trucker = TRUE
> end if
> if Request.Form("shipper") = "" then
> shipper = FALSE
> else
> shipper = TRUE
> end if
> if Request.Form("truckbroker") = "" then
> truckbroker = FALSE
> else
> truckbroker = TRUE
> end if
> if Request.Form("foodbroker") = "" then
> foodbroker = FALSE
> else
> foodbroker = TRUE
> end if
> if Request.Form("manufacturer") = "" then
> manufacturer = FALSE
> else
> manufacturer = TRUE
> end if
> if Request.Form("merchandiser") = "" then
> merchandiser = FALSE
> else
> merchandiser = TRUE
> end if
> if Request.Form("distributor") = "" then
> distributor = FALSE
> else
> distributor = TRUE
> end if
> if Request.Form("ltlcarrier") = "" then
> ltlcarrier = FALSE
> else
> ltlcarrier = TRUE
> end if
> othertype = prepare(Request.Form("othertype"))
> trknounits = Request.Form("trknounits")
> if trknounits = "" then trknounits = "0"
> trkstates = Request.Form("trkstates")
> if trkstates = "" then trkstates = "0"
> if Request.Form("trkreefer") = "" then
> trkreefer = FALSE
> else
> trkreefer = TRUE
> end if
> if Request.Form("trkvan") = "" then
> trkvan = FALSE
> else
> trkvan = TRUE
> end if
> if Request.Form("trkflatbed") = "" then
> trkflatbed = FALSE
> else
> trkflatbed = TRUE
> end if
> if Request.Form("trkdumptruck") = "" then
> trkdumptruck = FALSE
> else
> trkdumptruck = TRUE
> end if
> trkother = Request.Form("trkother")
> shploads = Request.Form("shploads")
> if shploads = "" then shploads = "0"
> shpstates = Request.Form("shpstates")
> if shpstates = "" then shpstates = "0"
> if Request.Form("shpreefer") = "" then
> shpreefer = FALSE
> else
> shpreefer = TRUE
> end if
> if Request.Form("shpvan") = "" then
> shpvan = FALSE
> else
> shpvan = TRUE
> end if
> if Request.Form("shpflatbed") = "" then
> shpflatbed = FALSE
> else
> shpflatbed = TRUE
> end if
> if Request.Form("shpdumptruck") = "" then
> shpdumptruck = FALSE
> else
> shpdumptruck = TRUE
> end if
> howsitefound = prepare(Request.Form("howsitefound"))
> shpother = prepare(Request.Form("shpother"))
> comments = prepare(Request.Form("comments"))
> End Sub
> if Request("mode") = "NEW" then
> getfields()
> Set rs = Server.CreateObject("ADODB.RecordSet")
> q = "INSERT INTO CompanyInfo (Company,Contact,Address1,Address2," &_
> " City,State,Zip,Country,Phone,Email,Key,D
isplayEmail,DisplayPhone," &_
> " Trucker,Shipper,TruckBroker,FoodBroker,M
anufacturer,Merchandiser," &_
> " Distributor,LTLCarrier,OtherType,trkNoUn
its,trkStates,trkReefer,trkVan,
"
> &_
> " trkFlatBed,trkDumpTruck,trkOther,shpLoad
s," &_
> " shpStates,shpReefer,shpVan,shpFlatbed,sh
pDumpTruck,shpOther,Comments,Acti
ve
> ,howsitefound)" &_
> " VALUES ('" & company & "','" & contact & "','" & address1 & "','" &
> address2 &_
> "','" & city & "','" & state & "','" & zip & "','" & country & "','" &
> phone &_
> "','" & email & "','" & key & "','" & displayemail & "','" & displayphon
e
> &_
> "'," & trucker & "," & shipper & "," & truckbroker & "," & foodbroker &
> "," &_
> manufacturer & "," & merchandiser & "," & distributor & "," & ltlcarrier
> &_
> ",'" & othertype & "'," & trknounits & "," & trkstates & "," & trkreefer
> &_
> "," & trkvan & "," & trkflatbed & "," & trkdumptruck & ",'" & trkother &
> "'," &_
> shploads & "," & shpstates & "," & shpreefer & "," & shpvan & "," &
> shpflatbed &_
> "," & shpdumptruck & ",'" & shpother & "','" & comments & "',1,'" &
> howsitefound & "')"
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> q = "SELECT Max(CompanyID) AS coid FROM CompanyInfo"
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> coid = rs("coid").value
> Response.Cookies("coid") = coid
> Response.Cookies("key") = key
> d = Date
> Response.Cookies("coid").expires = DateAdd("yyyy", 2, d)
> Response.Cookies("key").expires = DateAdd("yyyy", 2, d)
> mess = "Your Record has been added to the database. Your Company ID numbe
r
> is " &_
> coid & ". Your password is " & key & ". Please write them down. " &_
> "You may edit your record now, if you wish"
> rs.Close
> Set rs = Nothing
> ' if UCase(Request.ServerVariables("SERVER_NAME")) <> "ANGELA" then
> ' Set JMail = Server.CreateObject("JMail.SMTPMail")
> ' JMail.ServerAddress = "mail.truckloads.net:25"
> ' JMail.Sender = "msam@.plan-it-earth.net"
> ' JMail.Subject = "Your Company Registration With www.truckloads.net"
> ' JMail.AddRecipient email
> ' Body = "Dear " & contact & VbCrLf & VbCrLf &_
> ' "Thank you for registering your company with www.truckloads.net! " &
> VbCrLf & VbCrLf &_
> ' "Your Company ID is " & coid & VbCrLf &_
> ' "Your Password is " & key & VbCrLf & VbCrLf &_
> ' "These have been stored in a cookie on your computer for ease of use.
> However, " &_
> ' "if the cookie is deleted, or for some other reason you need to look u
p
> your " &_
> ' "Company ID and Password, please keep this email for future reference.
"
> & VbCrLf & VbCrLf &_
> ' "Thanks again, " & VbCrLf & VbCrLf &_
> ' "Mark A. Sam, Plan-It-Earth Web Management Services" & VbCrLf &_
> ' "msam@.plan-it-earth.net"
> '
> ' JMail.Body = Body
> ' JMail.Priority = 3
> '
> ' JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR"
)
> '' JMail.Execute
> '
> ' JMail.Subject = "New Company Registration With www.truckloads.net"
> ' JMail.AddRecipient "msam@.plan-it-earth.net"
> ' JMail.AddRecipient "takempis@.roanoke.infi.net"
> ' Body = "Dear Mark,"& VbCrLf & VbCrLf &_
> ' "The following company has registered with www.truckloads.net:" & VbCr
Lf
> & VbCrLf &_
> ' "Company: " & company & VbCrLf &_
> ' "Contact Name: " & contact & VbCrLf &_
> ' "Address1: " & address1 & VbCrLf &_
> ' "Address2: " & address2 & VbCrLf &_
> ' "City: " & city & VbCrLf &_
> ' "State: " & state & VbCrLf &_
> ' "Zip: " & zip & VbCrLf &_
> ' "Country: " & country & VbCrLf &_
> ' "Phone: " & phone & VbCrLf &_
> ' "Email: " & email & VbCrLf &_
> ' "Company ID:" & coid & VbCrLf &_
> ' "Password:" & key
> ' JMail.Body = Body
> ' JMail.Priority = 3
> '
> ' JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR"
)
> '' JMail.Execute
> ' Set JMail = Nothing
> ' end if
> elseif Request.Form("mode") = "DELETE" then
> Set rs = Server.CreateObject("ADODB.RecordSet")
> q = "DELETE FROM CompanyInfo WHERE CompanyID =" & Request.Form("coid")
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> Session("mess") = "Your Record has been deleted. You may enter another if
> you wish."
> Response.Cookies("coid") = ""
> Response.Cookies("key") = ""
> Response.Redirect "companyinfo.asp"
> elseif Request.Form("mode") = "UPDATE" then
> getfields()
> coid = Request.Form("coid")
> Set rs = Server.CreateObject("ADODB.RecordSet")
> q = "UPDATE CompanyInfo SET Company='" & company & "',Contact = '" &
> contact &_|||Turn off
"Show friendly HTTP error messages"
within the Internet Options of Internet Explorer.
re-run the page
Does that result in a better (more HELPFUL) error message?
Keith
"Mark A. Sam" <msam@.Plan-It-Earth.Net> wrote in message
news:%23XdranhYFHA.3040@.TK2MSFTNGP14.phx.gbl...
> Hello,
> I know this group doesn't pertain to Active Server Script, but I didn't
> see
> a group for that and though the SQL and Access people would be better
> suited
> to help me, since many have exerience with ASP scripting.
> I have Active Server pages which write data to an Access database. On a
> test page I set the DSN to an SQL server table that I created. I would
> assume it should run without a problem, but the page hangs up and I get a
> message:
> The page cannot be displayed
> All I can think is that there is something about the SQL Database which
> will
> require some rewriting. For example in the past when I modified a
> database
> to read SQL Server tables I had to add the property, dbSeeChanges to the
> OpenRecordSet method.
> I am wondering if there is something similar that I am unaware of which is
> making the page hang. I suspect the problem to be in the query insert
> query
> named, "q".
> I put the whole procedure below.
> Thanks for any help and God Bless,
> Mark A. Sam
>
> <%
> dim company
> dim coid
> dim contact
> dim address1
> dim address2
> dim city
> dim state
> dim zip
> dim country
> dim phone
> dim email
> dim key
> dim displayemail
> dim displayphone
> dim trucker
> dim shipper
> dim truckbroker
> dim foodbroker
> dim manufacturer
> dim merchandiser
> dim distributor
> dim ltlcarrier
> dim othertype
> dim trknounits
> dim trkstates
> dim trkreefer
> dim trkvan
> dim trkflatbed
> dim trkdumptruck
> dim trkother
> dim shploads
> dim shpstates
> dim shpreefer
> dim shpvan
> dim shpflatbed
> dim shpdumptruck
> dim shpother
> dim comments
> Dim howsitefound
> Function prepare(str)
> prepare = Replace(Replace(str,"'", "`"),Chr(34), """)
> End Function
> Sub getfields()
> alert('debug');
> company = prepare(Request.Form("company"))
> contact = prepare(Request.Form("contact"))
> address1 = prepare(Request.Form("address1"))
> address2 = prepare(Request.Form("address2"))
> city = prepare(Request.Form("city"))
> state = prepare(Request.Form("state"))
> zip = Request.Form("zip")
> country = prepare(Request.Form("country"))
> phone = Request.Form("phone")
> email = Request.Form("email")
> key = prepare(Request.Form("key"))
> displayemail = Request.Form("displayemail")
> displayphone = Request.Form("displayphone")
> if Request.Form("trucker") = "" then
> trucker = FALSE
> else
> trucker = TRUE
> end if
> if Request.Form("trucker") = "" then
> trucker = FALSE
> else
> trucker = TRUE
> end if
> if Request.Form("shipper") = "" then
> shipper = FALSE
> else
> shipper = TRUE
> end if
> if Request.Form("truckbroker") = "" then
> truckbroker = FALSE
> else
> truckbroker = TRUE
> end if
> if Request.Form("foodbroker") = "" then
> foodbroker = FALSE
> else
> foodbroker = TRUE
> end if
> if Request.Form("manufacturer") = "" then
> manufacturer = FALSE
> else
> manufacturer = TRUE
> end if
> if Request.Form("merchandiser") = "" then
> merchandiser = FALSE
> else
> merchandiser = TRUE
> end if
> if Request.Form("distributor") = "" then
> distributor = FALSE
> else
> distributor = TRUE
> end if
> if Request.Form("ltlcarrier") = "" then
> ltlcarrier = FALSE
> else
> ltlcarrier = TRUE
> end if
> othertype = prepare(Request.Form("othertype"))
> trknounits = Request.Form("trknounits")
> if trknounits = "" then trknounits = "0"
> trkstates = Request.Form("trkstates")
> if trkstates = "" then trkstates = "0"
> if Request.Form("trkreefer") = "" then
> trkreefer = FALSE
> else
> trkreefer = TRUE
> end if
> if Request.Form("trkvan") = "" then
> trkvan = FALSE
> else
> trkvan = TRUE
> end if
> if Request.Form("trkflatbed") = "" then
> trkflatbed = FALSE
> else
> trkflatbed = TRUE
> end if
> if Request.Form("trkdumptruck") = "" then
> trkdumptruck = FALSE
> else
> trkdumptruck = TRUE
> end if
> trkother = Request.Form("trkother")
> shploads = Request.Form("shploads")
> if shploads = "" then shploads = "0"
> shpstates = Request.Form("shpstates")
> if shpstates = "" then shpstates = "0"
> if Request.Form("shpreefer") = "" then
> shpreefer = FALSE
> else
> shpreefer = TRUE
> end if
> if Request.Form("shpvan") = "" then
> shpvan = FALSE
> else
> shpvan = TRUE
> end if
> if Request.Form("shpflatbed") = "" then
> shpflatbed = FALSE
> else
> shpflatbed = TRUE
> end if
> if Request.Form("shpdumptruck") = "" then
> shpdumptruck = FALSE
> else
> shpdumptruck = TRUE
> end if
> howsitefound = prepare(Request.Form("howsitefound"))
> shpother = prepare(Request.Form("shpother"))
> comments = prepare(Request.Form("comments"))
> End Sub
> if Request("mode") = "NEW" then
> getfields()
> Set rs = Server.CreateObject("ADODB.RecordSet")
> q = "INSERT INTO CompanyInfo (Company,Contact,Address1,Address2," &_
> " City,State,Zip,Country,Phone,Email,Key,D
isplayEmail,DisplayPhone," &_
> " Trucker,Shipper,TruckBroker,FoodBroker,M
anufacturer,Merchandiser," &_
> " Distributor,LTLCarrier,OtherType,trkNoUn
its,trkStates,trkReefer,trkVan,"
> &_
> " trkFlatBed,trkDumpTruck,trkOther,shpLoad
s," &_
> " shpStates,shpReefer,shpVan,shpFlatbed,sh
pDumpTruck,shpOther,Comments,Acti
ve
> ,howsitefound)" &_
> " VALUES ('" & company & "','" & contact & "','" & address1 & "','" &
> address2 &_
> "','" & city & "','" & state & "','" & zip & "','" & country & "','" &
> phone &_
> "','" & email & "','" & key & "','" & displayemail & "','" & displayphone
> &_
> "'," & trucker & "," & shipper & "," & truckbroker & "," & foodbroker &
> "," &_
> manufacturer & "," & merchandiser & "," & distributor & "," & ltlcarrier
> &_
> ",'" & othertype & "'," & trknounits & "," & trkstates & "," & trkreefer
> &_
> "," & trkvan & "," & trkflatbed & "," & trkdumptruck & ",'" & trkother &
> "'," &_
> shploads & "," & shpstates & "," & shpreefer & "," & shpvan & "," &
> shpflatbed &_
> "," & shpdumptruck & ",'" & shpother & "','" & comments & "',1,'" &
> howsitefound & "')"
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> q = "SELECT Max(CompanyID) AS coid FROM CompanyInfo"
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> coid = rs("coid").value
> Response.Cookies("coid") = coid
> Response.Cookies("key") = key
> d = Date
> Response.Cookies("coid").expires = DateAdd("yyyy", 2, d)
> Response.Cookies("key").expires = DateAdd("yyyy", 2, d)
> mess = "Your Record has been added to the database. Your Company ID number
> is " &_
> coid & ". Your password is " & key & ". Please write them down. " &_
> "You may edit your record now, if you wish"
> rs.Close
> Set rs = Nothing
> ' if UCase(Request.ServerVariables("SERVER_NAME")) <> "ANGELA" then
> ' Set JMail = Server.CreateObject("JMail.SMTPMail")
> ' JMail.ServerAddress = "mail.truckloads.net:25"
> ' JMail.Sender = "msam@.plan-it-earth.net"
> ' JMail.Subject = "Your Company Registration With www.truckloads.net"
> ' JMail.AddRecipient email
> ' Body = "Dear " & contact & VbCrLf & VbCrLf &_
> ' "Thank you for registering your company with www.truckloads.net! " &
> VbCrLf & VbCrLf &_
> ' "Your Company ID is " & coid & VbCrLf &_
> ' "Your Password is " & key & VbCrLf & VbCrLf &_
> ' "These have been stored in a cookie on your computer for ease of use.
> However, " &_
> ' "if the cookie is deleted, or for some other reason you need to look
> up
> your " &_
> ' "Company ID and Password, please keep this email for future reference.
> "
> & VbCrLf & VbCrLf &_
> ' "Thanks again, " & VbCrLf & VbCrLf &_
> ' "Mark A. Sam, Plan-It-Earth Web Management Services" & VbCrLf &_
> ' "msam@.plan-it-earth.net"
> '
> ' JMail.Body = Body
> ' JMail.Priority = 3
> '
> ' JMail.AddHeader "Originating-IP",
> Request.ServerVariables("REMOTE_ADDR")
> '' JMail.Execute
> '
> ' JMail.Subject = "New Company Registration With www.truckloads.net"
> ' JMail.AddRecipient "msam@.plan-it-earth.net"
> ' JMail.AddRecipient "takempis@.roanoke.infi.net"
> ' Body = "Dear Mark,"& VbCrLf & VbCrLf &_
> ' "The following company has registered with www.truckloads.net:" &
> VbCrLf
> & VbCrLf &_
> ' "Company: " & company & VbCrLf &_
> ' "Contact Name: " & contact & VbCrLf &_
> ' "Address1: " & address1 & VbCrLf &_
> ' "Address2: " & address2 & VbCrLf &_
> ' "City: " & city & VbCrLf &_
> ' "State: " & state & VbCrLf &_
> ' "Zip: " & zip & VbCrLf &_
> ' "Country: " & country & VbCrLf &_
> ' "Phone: " & phone & VbCrLf &_
> ' "Email: " & email & VbCrLf &_
> ' "Company ID:" & coid & VbCrLf &_
> ' "Password:" & key
> ' JMail.Body = Body
> ' JMail.Priority = 3
> '
> ' JMail.AddHeader "Originating-IP",
> Request.ServerVariables("REMOTE_ADDR")
> '' JMail.Execute
> ' Set JMail = Nothing
> ' end if
> elseif Request.Form("mode") = "DELETE" then
> Set rs = Server.CreateObject("ADODB.RecordSet")
> q = "DELETE FROM CompanyInfo WHERE CompanyID =" & Request.Form("coid")
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> Session("mess") = "Your Record has been deleted. You may enter another if
> you wish."
> Response.Cookies("coid") = ""
> Response.Cookies("key") = ""
> Response.Redirect "companyinfo.asp"
> elseif Request.Form("mode") = "UPDATE" then
> getfields()
> coid = Request.Form("coid")
> Set rs = Server.CreateObject("ADODB.RecordSet")
> q = "UPDATE CompanyInfo SET Company='" & company & "',Contact = '" &
> contact &_
> "', Address1 = '" & address1 & "', Address2 = '" & address2 &_
> "', City ='" & city & "', State = '" & state & "', Zip = '" & zip &_
> "',Country = '" & country & "', Phone = '" & phone & "', Email = '" &_
> email & "', Key = '" & key & "', DisplayEmail = '" & displayemail &_
> "', DisplayPhone = '" & displayphone & "', Trucker = " & trucker &_
> ", Shipper = " & shipper & ", TruckBroker = " & truckbroker & ",
> FoodBroker = " &_
> foodbroker & ", Manufacturer = " & manufacturer & ", Merchandiser = " &_
> merchandiser & ", Distributor = " & distributor & ", LTLCarrier = " &_
> ltlcarrier & ", OtherType = '" & othertype & "', trkNoUnits = " &
> trknounits &_
> ", trkStates = " & trkstates & ", trkReefer = " & trkreefer & ", trkVan =
> " &_
> trkvan & ", trkFlatbed = " & trkflatbed & ",trkDumpTruck = " &
> trkdumptruck &_
> ",trkOther = '" & trkother & "', shpLoads = " & shploads & ", shpStates =
> " &_
> shpstates & ", shpReefer = " & shpreefer & ", shpVan = " & shpvan &_
> ", shpFlatbed = " & shpflatbed & ", shpDumpTruck = " & shpdumptruck &_
> ", shpOther = '" & shpother & "', Comments = '" & comments & "' WHERE
> CompanyID = " &_
> Request.Form("coid")
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> Response.Cookies("coid") = coid
> Response.Cookies("key") = key
> d = Date
> Response.Cookies("coid").expires = DateAdd("yyyy", 2, d)
> Response.Cookies("key").expires = DateAdd("yyyy", 2, d)
> mess = "Your Record has been updated."
> Set rs = Nothing
> elseif Request("mode") = "KEY" then
> coid = Request("coid")
> key = Request("key")
> Set rs = Server.CreateObject("ADODB.RecordSet")
> q = "SELECT * FROM CompanyInfo WHERE CompanyID = " & coid &_
> " AND Key LIKE '" & key & "'"
> rs.Open q, "DSN=TruckLoadsDevSQL;"
> if rs.EOF then
> Session("mess") = "Sorry. Your Company ID and/or password were not found.
> Try again?"
> Response.Redirect "companykey.asp"
> end if
> company = prepare(rs("Company").value)
> contact = prepare(rs("Contact").value)
> address1 = prepare(rs("Address1").value)
> address2 = prepare(rs("Address2").value)
> city = prepare(rs("City").value)
> state = prepare(rs("State").value)
> zip = rs("Zip").value
> country = prepare(rs("Country").value)
> phone = rs("Phone").value
> email = rs("Email").value
> key = prepare(rs("Key").value)
> displayemail = rs("DisplayEmail").value
> displayphone = rs("DisplayPhone").value
> trucker = rs("Trucker").value
> shipper = rs("Shipper").value
> truckbroker = rs("TruckBroker").value
> foodbroker = rs("FoodBroker").value
> manufacturer = rs("Manufacturer").value
> merchandiser = rs("Merchandiser").value
> distributor = rs("Distributor").value
> ltlcarrier = rs("LTLCarrier").value
> othertype = prepare(rs("OtherType").value)
> trknounits = rs("trkNoUnits").value
> if trknounits = "" then trknounits = "0"
> trkstates = rs("trkStates").value
> if trkstates = "" then trkstates = "0"
> trkreefer = rs("trkReefer").value
> trkvan = rs("trkVan").value
> trkflatbed = rs("trkFlatBed").value
> trkdumptruck = rs("trkDumpTruck").value
> trkother = rs("trkOther").value
> shploads = rs("shpLoads").value
> if shploads = "" then shploads = "0"
> shpstates = rs("shpStates").value
> if shpstates = "" then shpstates = "0"
> shpreefer = rs("shpReefer").value
> shpvan = rs("shpVan").value
> shpflatbed = rs("shpFlatBed").value
> shpdumptruck = rs("shpDumpTruck").value
> shpother = prepare(rs("shpOther").value)
> comments = prepare(rs("Comments").value)
> Response.Cookies("coid") = coid
> Response.Cookies("key") = key
> d = Date
> Response.Cookies("coid").expires = DateAdd("yyyy", 2, d)
> Response.Cookies("key").expires = DateAdd("yyyy", 2, d)
> end if
> %>
> <html>
> <head>
> <meta NAME="keywords"
> CONTENT="Truckloads. NET,Loads,Load,Loading,Frieght,Freight,T
ruckers,Trucke
r,
> Trucking,Shipper,Shippers,Shipping,Reefe
rs,Reefer,Vans,Dry Vans,Van,Dry
> Van,Haul,Hauling,Backhaul,Backhauls,LTL,
TruckStop,TruckStops,Cash
> Advance,Cach Advances,Rig,Rigs,Manufacturing,UPS,Fede
ral
> Express,Airborne,Agriculture,Produce,Cab
bage,Tomatoes,Fruit,Vegetables,App
le
> s,Peaches,Newsprint,Commodities,Potatoes
,Nursery Stock">
> <meta NAME="description"
> CONTENT="List and Find Trucks and loads. This service is for any person
> or
> company that utilizes trucks for hauling merchandise. This is a listing
> service open to Truckers, Shippers, and Brokers. Registration is required
> for posting to the site. Searches are open to anyone">
> <meta NAME="Author"
> CONTENT="Mark A. Sam 716-679-7607 msam@.plan-it-earth.net Plan-It-Earth
> Web
> Management Services Box 110 Dunkirk, NY 14048 716-679-7607">
> <title>Edit Your Company Information</title>
> <meta name="Microsoft Border" content="tb">
> </head>
> <body leftmargin="0" topmargin="0" background="../images/trucksbg.gif"
> bgcolor="#FFFFFF"
> link="#000080" vlink="#800080" alink="#000080">
> <p><script language="JavaScript"><!--
> <%if mess <> "" then%>
> alert("<%=mess%>");
> <%end if%>
> // --></script> <script LANGUAGE="JavaScript">
> <!--
> function delconfirm(theForm) {
> if(confirm("Are you sure you want to delete your record?")) return (true);
> return(false);
> }
> // -->
> </script> <u><font
> size="4"><strong><script LANGUAGE="JavaScript">
> <!--
> function Validate(theForm)
> {
> if (theForm.company.value == "")
> {
> alert("Please enter a value for the \"Company Name\" field.");
> theForm.company.focus();
> return (false);
> }
> if (theForm.company.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"Company Name\"
> field.");
> theForm.company.focus();
> return (false);
> }
> if (theForm.contact.value == "")
> {
> alert("Please enter a value for the \"Contact Name\" field.");
> theForm.contact.focus();
> return (false);
> }
> if (theForm.contact.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"Contact Name\"
> field.");
> theForm.contact.focus();
> return (false);
> }
> if (theForm.address1.value == "")
> {
> alert("Please enter a value for the \"Address Line 1\" field.");
> theForm.address1.focus();
> return (false);
> }
> if (theForm.address1.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"Address Line 1\"
> field.");
> theForm.address1.focus();
> return (false);
> }
> if (theForm.city.value == "")
> {
> alert("Please enter a value for the \"City\" field.");
> theForm.city.focus();
> return (false);
> }
> if (theForm.city.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"City\" field.");
> theForm.city.focus();
> return (false);
> }
> if (theForm.state.value == "")
> {
> alert("Please enter a value for the \"State\" field.");
> theForm.state.focus();
> return (false);
> }
> if (theForm.state.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"State\" field.");
> theForm.state.focus();
> return (false);
> }
> if (theForm.zip.value == "")
> {
> alert("Please enter a value for the \"Postal Code\" field.");
> theForm.zip.focus();
> return (false);
> }
> if (theForm.zip.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"Postal Code\"
> field.");
> theForm.zip.focus();
> return (false);
> }
> if (theForm.country.value == "")
> {
> alert("Please enter a value for the \"Country\" field.");
> theForm.country.focus();
> return (false);
> }
> if (theForm.country.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"Country\" field.");
> theForm.country.focus();
> return (false);
> }
> if (theForm.phone.value == "")
> {
> alert("Please enter a value for the \"Phone\" field.");
> theForm.phone.focus();
> return (false);
> }
> if (theForm.phone.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"Phone\" field.");
> theForm.phone.focus();
> return (false);
> }
> if (theForm.email.value == "")
> {
> alert("Please enter a value for the \"Email Address\" field.");
> theForm.email.focus();
> return (false);
> }
> if (theForm.email.value.length > 50)
> {
> alert("Please enter at most 50 characters in the \"Email Address\"
> field.");
> theForm.email.focus();
> return (false);
> }
> if (theForm.key.value == "")
> {
> alert("Please enter a value for the \"Password\" field.");
> theForm.key.focus();
> return (false);
> }
> if (theForm.key.value.length < 6)
> {
> alert("Please enter at least 6 characters in the \"Password\" field.");
> theForm.key.focus();
> return (false);
> }
> if (theForm.key.value.length > 12)
> {
> alert("Please enter at most 12 characters in the \"Password\" field.");
> theForm.key.focus();
> return (false);
> }
> var checkOK = "0123456789-";
> var checkStr = theForm.trknounits.value;
> var allValid = true;
> var decPoints = 0;
> var allNum = "";
> for (i = 0; i < checkStr.length; i++)
> {
> ch = checkStr.charAt(i);
> for (j = 0; j < checkOK.length; j++)
> if (ch == checkOK.charAt(j))
> break;
> if (j == checkOK.length)
> {
> allValid = false;
> break;
> }
> allNum += ch;
> }
> if (!allValid)
> {
> alert("Please enter only digit characters in the \"Trucker - Number of
> Units that you run\" field.");
> theForm.trknounits.focus();
> return (false);
> }
> var checkOK = "0123456789-";
> var checkStr = theForm.trkstates.value;
> var allValid = true;
> var decPoints = 0;
> var allNum = "";
> for (i = 0; i < checkStr.length; i++)
> {
> ch = checkStr.charAt(i);
> for (j = 0; j < checkOK.length; j++)
> if (ch == checkOK.charAt(j))
> break;
> if (j == checkOK.length)
> {
> allValid = false;
> break;
> }
> allNum += ch;
> }
> if (!allValid)
> {
> alert("Please enter only digit characters in the \"Trucker - Number of
> States that you cover\" field.");
> theForm.trkstates.focus();
> return (false);
> }
> var checkOK = "0123456789-";
> var checkStr = theForm.shploads.value;
> var allValid = true;
> var decPoints = 0;
> var allNum = "";
> for (i = 0; i < checkStr.length; i++)
> {
> ch = checkStr.charAt(i);
> for (j = 0; j < checkOK.length; j++)
> if (ch == checkOK.charAt(j))
> break;
> if (j == checkOK.length)
> {
> allValid = false;
> break;
> }
> allNum += ch;
> }
> if (!allValid)
> {
> alert("Please enter only digit characters in the \"Shipper- Number of
> Loads that you ship per w\" field.");
> theForm.shploads.focus();
> return (false);
> }
> var checkOK = "0123456789-";
> var checkStr = theForm.shpstates.value;
> var allValid = true;
> var decPoints = 0;
> var allNum = "";
> for (i = 0; i < checkStr.length; i++)
> {
> ch = checkStr.charAt(i);
> for (j = 0; j < checkOK.length; j++)
> if (ch == checkOK.charAt(j))
> break;
> if (j == checkOK.length)
> {
> allValid = false;
> break;
> }
> allNum += ch;
> }
> if (!allValid)
> {
> alert("Please enter only digit characters in the \"Shipper- Number of
> States that you ship to\" field.");
> theForm.shpstates.focus();
> return (false);
> }
> var done = 0;
> if(theForm.trucker.checked == (true)) done = 1;
> if(theForm.shipper.checked == (true)) done = 1;
> if(theForm.truckbroker.checked == (true)) done = 1;
> if(theForm.foodbroker.checked == (true)) done = 1;
> if(theForm.manufacturer.checked == (true)) done = 1;
> if(theForm.merchandiser.checked == (true)) done = 1;
> if(theForm.distributor.checked == (true)) done = 1;
> if(theForm.ltlcarrier.checked == (true)) done = 1;
> if(theForm.othertype.value != "") done = 1;
> if(done == 0) {
> alert("You must choose at least one Company Type.");
> theForm.trucker.focus();
> return (false);
> }
> return (true);
> }
> // -->
> </script> </strong></u></p>
> <table width="653" cellpadding="10" align="LEFT" valign="TOP">
> <tr>
> <!-- Button Column -->
> <td width="150" align="LEFT" valign="TOP"><a
> href="http://links.10026.com/?link=../asp/searchloads.asp">
> <img
> src="http://pics.10026.com/?src=../ImagesButtons/searchloads.jpg" alt border="0"></a><a
> href="http://links.10026.com/?link=../asp/searchtrucks.asp"><img
> src="http://pics.10026.com/?src=../ImagesButtons/searchtrucks.jpg" alt border="0"></a><a
> href="http://links.10026.com/?link=../information/information.asp"><img
> src="http://pics.10026.com/?src=../ImagesButtons/information.jpg" alt border="0"></a> </td>
> <!-- Content column -->
> <td align="LEFT" valign="TOP" width="457"><table border="0"
> width="100%">
> <tr>
> <td width="100%"><p align="center"><font size="4"><strong>Edit Your
> Company Information</strong></p>
> <table border="0" width="100%">
> <tr>
> <td align="left" valign="top"><a
> href="http://links.10026.com/?link=truckinfo.asp?mode=EDIT&coid=<%=coid%>&key=<%=key%>"><img
> src="http://pics.10026.com/?src=../images/EnterTrucks.gif" alt="Enter Your Trucks"
> align="left" border="0"></a></td>
> <td align="left" valign="top"><a
> href="http://links.10026.com/?link=loadinfo.asp?mode=EDIT&coid=<%=coid%>&key=<%=key%>"><img
> src="http://pics.10026.com/?src=../images/EnterLoads.gif" alt="Enter Your Load"
> align="left" border="0"></a></td>
> <td align="left" valign="top"><a
> href="http://links.10026.com/?link=listing.asp?company=<%=Server.URLEncode(company)%>&coid=<%=coid%
>"
> Delete Trucks or Loads</strong></a></td>
> </tr>
> </table>
> </td>
> </tr>
> <tr>
> <td width="100%">
> <p align="center"><b><span lang="en-us"><font face="Arial">
> <font color="#FF0000">We would like you to take a survey for a
> new
> service to help you get more business.<br>
> <a target="_blank"
> href="http://links.10026.com/?link=http://www.Plan-It-Earth.Net/TLOSurvey/Default.htm">
> Click Here</a></span></b></td>
> </tr>
> </table>
> <p align="left"><strong><font color="#800000">Please check the
> information you submitted
> and fix any errors!<br>
> Fields with a <font size="5" color="#FF0000">* are required<span
> lang="en-us">
> <font color="#800000"><span style="background-color:
> #FFFF00">$$$$</span></span></strong></p>
> <form ACTION="companyedit.asp" METHOD="POST" ONSUBMIT="return
> Validate(this)">
> <input type="hidden" name="coid" value="<%=coid%>"><input
> type="hidden" name="mode"
> value="UPDATE"><table border="0" width="100%">
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Company
> Name</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=company%>"
> SIZE="35" ID="fp3"
> NAME="company" maxlength="50"> <br>
> <font size="1" face="Arial">( 0r Your Name )</strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Contact
> Name</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=contact%>"
> SIZE="35" ID="fp3"
> NAME="contact" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Address
> Line 1</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=address1%>"
> SIZE="35" ID="fp3"
> NAME="address1" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong>Address Line
> 2</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=address2%>"
> SIZE="35" ID="fp3"
> NAME="address2" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*City</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=city%>"
> SIZE="35" ID="fp3"
> NAME="city" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*State</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=state%>"
> SIZE="35" ID="fp3"
> NAME="state" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Postal
> Code</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=zip%>"
> SIZE="35" ID="fp3" NAME="zip"
> maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Country</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="USA" SIZE="35"
> ID="fp3" NAME="country"
> maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Phone</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=phone%>"
> SIZE="35" ID="fp3"
> NAME="phone" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Email
> Address</strong></td>
> <td width="70%" valign="top"><strong><input VALUE="<%=email%>"
> SIZE="35" ID="fp3"
> NAME="email" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Select
> a Password</strong></td>
> <td width="70%" valign="top"><strong><font color="#000000"><input
> VALUE="<%=key%>"
> SIZE="12" ID="fp10" NAME="key"> <br>
> <font color="#000000" size="1" face="Arial">( 6 - 12
> characters )</strong></td>
> </tr>
> <tr>
> <td width="100%" colspan="2" valign="top"><strong>Type a Phone
> and
> Email Address you wish
> to be <em>displayed</em> with your transactions.</strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong>Email
> Address</strong></td>
> <td width="70%" valign="top"><strong><input
> VALUE="<%=displayemail%>" SIZE="35" ID="fp3"
> NAME="displayemail" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font size="5"
> color="#FF0000">*Phone</strong></td>
> <td width="70%" valign="top"><strong><input
> VALUE="<%=displayphone%>" SIZE="35" ID="fp3"
> NAME="displayphone" maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="100%" colspan="2" bgcolor="#C0C0C0"
> height="1" valign="top"></td>
> </tr>
> <tr>
> <td width="100%" colspan="2" valign="top"><strong><font size="5"
> color="#FF0000">*Type
> of company (Check <font color="#800000">at least one, and
> check all that apply):<br>
> </strong><input TYPE="checkbox" <%if trucker = TRUE then%>
> checked
> <%end if%> VALUE="ON"
> ID="fp16" NAME="trucker"> <strong><label
> for="fp16">Trucker</label><br>
> <input TYPE="checkbox" <%if shipper = TRUE then%> checked <%end
> if%> VALUE="ON" ID="fp17"
> NAME="shipper"> <label for="fp17">Shipper</label><br>
> <input TYPE="checkbox" <%if truckbroker = TRUE then%> checked
> <%end if%> VALUE="ON"
> ID="fp18" NAME="truckbroker"> <label for="fp18">Truck
> Broker</label><br>
> <input TYPE="checkbox" <%if foodbroker = TRUE then%> checked
> <%end
> if%> VALUE="ON"
> ID="fp19" NAME="foodbroker"> <label for="fp19">Food
> Broker</label><br>
> <input TYPE="checkbox" <%if manufacturer = TRUE then%> checked
> <%end if%> VALUE="ON"
> ID="fp20" NAME="manufacturer"> <label
> for="fp20">Manufacturer</label><br>
> <input TYPE="checkbox" <%if merchandiser = TRUE then%> checked
> <%end if%> VALUE="ON"
> ID="fp21" NAME="merchandiser"> <label
> for="fp21">Mechandiser</label><br>
> <input TYPE="checkbox" <%if distributor = TRUE then%> checked
> <%end if%> VALUE="ON"
> ID="fp22" NAME="distributor"> <label
> for="fp22">Distributor</label><br>
> <input TYPE="checkbox" <%if ltlcarrier = TRUE then%> checked
> <%end
> if%> VALUE="ON"
> ID="fp23" NAME="ltlcarrier"> <label for="fp23">LTL
> Carrier</label><br>
> Other Type <input VALUE="<%=othertype%>" SIZE="50" ID="fp24"
> NAME="othertype"
> maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="100%" colspan="2" bgcolor="#C0C0C0"
> height="1" valign="top"></td>
> </tr>
> <tr>
> <td width="100%" colspan="2" valign="top"><strong>Please supply
> the following Information
> (Not required)</strong></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><font
> color="#400000"><strong>Truckers</strong></td>
> <td width="70%" valign="top"></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><font
> color="#0000a0"><strong>Number of units
> that you run</strong></td>
> <td width="70%" valign="top"><input VALUE="<%=trknounits%>"
> SIZE="6" NAME="trknounits"> </td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font
> color="#0000a0">Number of states
> that you cover</strong></td>
> <td width="70%" valign="top"><input VALUE="<%=trkstates%>"
> SIZE="6" NAME="trkstates"> </td>
> </tr>
> <tr>
> <td width="100%" colspan="2" valign="top"><strong><font
> color="#0000a0">Type of trucks </strong><input
> TYPE="checkbox" <%if trkreefer = TRUE then%> checked <%end if%>
> VALUE="ON" ID="fp11"
> NAME="trkreefer"> <label for="fp11">Reefers</label> <input
> TYPE="checkbox"
> <%if trkvan = TRUE then%> checked <%end if%> VALUE="ON" ID="fp12"
> NAME="trkvan"> <label
> for="fp12">Vans</label> <input TYPE="checkbox" <%if trkflatbed =
> TRUE then%> checked
> <%end if%> VALUE="ON" ID="fp13" NAME="trkflatbed"> <label
> for="fp13">Flatbeds</label> <input
> TYPE="checkbox" <%if trkdumptruck = TRUE then%> checked <%end
> if%>
> VALUE="ON" ID="fp14"
> NAME="trkdumptruck"> <label for="fp14">Dump Trucks</label> <br>
> <font color="#0000A0"><strong>Other Type</strong>
> <strong><input
> VALUE="<%=trkother%>" SIZE="50" ID="fp24" NAME="trkother"
> maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="100%" colspan="2" bgcolor="#C0C0C0" height="1"
> valign="top"></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font
> color="#400000">Shippers</strong></td>
> <td width="70%" valign="top"></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font
> color="#0000a0">Number of loads<br>
> that you ship per w</strong></td>
> <td width="70%" valign="top"><input VALUE="<%=shploads%>"
> SIZE="6"
> NAME="shploads"> </td>
> </tr>
> <tr>
> <td width="30%" valign="top"><strong><font
> color="#0000a0">Number of states
> that you ship to</strong></td>
> <td width="70%" valign="top"><input VALUE="<%=shpstates%>"
> SIZE="6" NAME="shpstates"> </td>
> </tr>
> <tr>
> <td width="100%" colspan="2" valign="top"><strong><font
> color="#0000a0">Type of trucks
> needed </strong><input TYPE="checkbox" <%if shpreefer =
> TRUE then%> checked
> <%end if%> VALUE="ON" ID="fp11" NAME="shpreefer"> <label
> for="fp11">Reefers</label> <input
> TYPE="checkbox" <%if shpvan = TRUE then%> checked <%end if%>
> VALUE="ON" ID="fp12"
> NAME="shpvan"> <label for="fp12">Vans</label> <input
> TYPE="checkbox"
> <%if shpflatbed = TRUE then%> checked <%end if%> VALUE="ON"
> ID="fp13" NAME="shpflatbed"> <label
> for="fp13">Flatbeds</label> <input TYPE="checkbox" <%if
> shpdumptruck = TRUE then%> checked
> <%end if%> VALUE="ON" ID="fp14" NAME="shpdumptruck"> <label
> for="fp14">Dump Trucks</label>
> <br>
> <font color="#0000A0"><strong>Other Type</strong>
> <strong><input
> VALUE="<%=shpother%>" SIZE="50" ID="fp24" NAME="shpother"
> maxlength="50"> </strong></td>
> </tr>
> <tr>
> <td width="100%" colspan="2" bgcolor="#C0C0C0"
> height="1" valign="top"></td>
> </tr>
> <tr>
> <td width="30%"
> valign="top"><strong>Comments</strong></td>
> <td width="70%" valign="top"><label for="fp1"><strong><font
> color="#ffffff"><textarea
> ROWS="6" COLS="35" NAME="comments"><%=comments%>
> </textarea></strong></label></td>
> </tr>
> <tr>
> <td width="30%" valign="top"><input TYPE="submit" VALUE="Update"
> NAME="Submitted"> </td>
> <td width="70%" valign="top"><input TYPE="reset" VALUE="Reset"
> NAME="B2"></td>
> </tr>
> </table>
> </form>
> </td>
> </tr>
> </table>
> </html>
>
>|||Keith,
Thanks. That was just what I needed. I wish I knew that a long time ago
for other issues.
Here is the error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/aspSQL/CompanyEdit.asp, line 178
This is a hosted site, and I set up a DSN through a control panel they
provided. Apparently something is wrong on their end. Now I can take it
up with their Tech Support and have something solid to give to them.
God Bless,
Mark
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
news:usVOc3hYFHA.2900@.TK2MSFTNGP10.phx.gbl...
> Turn off
> "Show friendly HTTP error messages"
> within the Internet Options of Internet Explorer.
> re-run the page
> Does that result in a better (more HELPFUL) error message?
> --
> Keith
>
> "Mark A. Sam" <msam@.Plan-It-Earth.Net> wrote in message
> news:%23XdranhYFHA.3040@.TK2MSFTNGP14.phx.gbl...
a
is
" Distributor,LTLCarrier,OtherType,trkNoUn
its,trkStates,trkReefer,trkVan,"
" shpStates,shpReefer,shpVan,shpFlatbed,sh
pDumpTruck,shpOther,Comments,Active[colo
r=darkred]
displayphone
ltlcarrier
trkreefer
&
number
use.
reference.
if
&_
=
=
found.
CONTENT="Truckloads. NET,Loads,Load,Loading,Frieght,Freight,T
ruckers,Trucker,
Express,Airborne,Agriculture,Produce,Cab
bage,Tomatoes,Fruit,Vegetables,Apple[col
or=darkred]
required
(true);
field.");
field.");
field.");
of
of
</td>
Your
href="listing.asp?company=<%=Server.URLEncode(company)%>&coid=<%=coid%>"
required<span
size="5"
VALUE="<%=company%>"
Name )</strong></td>
size="5"
VALUE="<%=contact%>"
size="5"
VALUE="<%=address1%>"
VALUE="<%=address2%>"
size="5"
size="5"
size="5"
size="5"
SIZE="35"
size="5"
size="5"
size="5"
color="#000000"><input
size="5"
size="5"
and
ID="fp12"
=
VALUE="Update"
>|||Use DSN-less connections! Refer to www.connectionstrings.com to show you
how to create a connection string within the asp code that contains
everything that you need.
Keith
"Mark A. Sam" <msam@.Plan-It-Earth.Net> wrote in message
news:uBkpTXiYFHA.2520@.TK2MSFTNGP09.phx.gbl...
> Keith,
> Thanks. That was just what I needed. I wish I knew that a long time ago
> for other issues.
> Here is the error:
> Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> [Microsoft][ODBC Driver Manager] Data source name not found and no default
> driver specified
> /aspSQL/CompanyEdit.asp, line 178
>
> This is a hosted site, and I set up a DSN through a control panel they
> provided. Apparently something is wrong on their end. Now I can take it
> up with their Tech Support and have something solid to give to them.
> God Bless,
> Mark
>
> "Keith Kratochvil" <sqlguy.back2u@.comcast.net> wrote in message
> news:usVOc3hYFHA.2900@.TK2MSFTNGP10.phx.gbl...
> a
> is
> " Distributor,LTLCarrier,OtherType,trkNoUn
its,trkStates,trkReefer,trkVan,"
> " shpStates,shpReefer,shpVan,shpFlatbed,sh
pDumpTruck,shpOther,Comments,Acti
ve
> displayphone
> ltlcarrier
> trkreefer
> &
> number
> use.
> reference.
> if
> &_
> =
> =
> found.
> CONTENT="Truckloads. NET,Loads,Load,Loading,Frieght,Freight,T
ruckers,Trucke
r,
> Express,Airborne,Agriculture,Produce,Cab
bage,Tomatoes,Fruit,Vegetables,App
le
> required
> (true);
> field.");
> field.");
> field.");
> of
> of
> </td>
> Your
> href="http://links.10026.com/?link=listing.asp?company=<%=Server.URLEncode(company)%>&coid=<%=coid%
>"
> required<span
> size="5"
> VALUE="<%=company%>"
> Name )</strong></td>
> size="5"
> VALUE="<%=contact%>"
> size="5"
> VALUE="<%=address1%>"
> VALUE="<%=address2%>"
> size="5"
> size="5"
> size="5"
> size="5"
> SIZE="35"
> size="5"
> size="5"
> size="5"
> color="#000000"><input
> size="5"
> size="5"
> and
> ID="fp12"
> =
> VALUE="Update"
>