M
mcarlyle via AccessMonster.com
I had a split DB with a front and BE in Access. I am converting the BE to
SQL because of the size and number of users. I have all the conversion done;
however, I have various vendors sending me information via a web page that
works fine on the Access BE but doesn't connect once the BE has been upsized
to SQL. I tried to create a connection to the SQL DB that looked like the
old BE with the same name, table names, and location as the old BE was;
however, when someone enters data on the web page, it errors out instead of
connecting and dropping the data.
Old code for Web page...
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\client
manager\cm4_be.mdb;Jet OLEDB:System Database=D:\client manager\Security.
mdw;User ID=jbiggs;Password=153480;"
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open(ConnectionString)
set rs = Server.CreateObject("ADODB.recordset")
set rs2 = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT FirstName FROM Clients WHERE HomePhone = '" & hphone & "'",
Connection
If Not rs.EOF Then
Response.Write("Lead already exists. Please enter a new lead.")
Else
If fname <> "" and lname <> "" Then
rs.close
rs.open "SELECT * FROM [TZ List] WHERE [Area Code] = '" &
areacode & "'", Connection
timezone = rs("Time Zone")
sql = "INSERT INTO Clients ([Time Zones],areacode,LeadType,
customerordersaleID,IP,Source,FirstName,LastName,StreetAddress,City,State,Zip,
HomePhone,WorkPhone,Email,DebtAmount,MonthsBehind,ContactTime,Comment,
CreditorName1) VALUES ('" & timezone & "','" & areacode & "','" & leadtype &
"','" & orderid & "','" & ip & "','" & source & "','" & fname & "','" & lname
& "','" & street & "','" & city & "','" & state & "','" & zip & "','" &
hphone & "','" & wphone & "','" & email & "','" & debtamt & "','" & mosbehind
& "','" & contacttime & "','" & comment & "','" & creditor & "')"
Connection.Execute sql,recaffected
Response.Write("Lead submitted successfully!")
Else
Response.Write("Missing Information! Please complete
source, name, phone, email, debt amount and city/state or zip.")
End If
End If
rs.close
Connection.close
This will dump data into an ACCESS BE but not an Upsized to SQL Access BE
Any ideas why?
SQL because of the size and number of users. I have all the conversion done;
however, I have various vendors sending me information via a web page that
works fine on the Access BE but doesn't connect once the BE has been upsized
to SQL. I tried to create a connection to the SQL DB that looked like the
old BE with the same name, table names, and location as the old BE was;
however, when someone enters data on the web page, it errors out instead of
connecting and dropping the data.
Old code for Web page...
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\client
manager\cm4_be.mdb;Jet OLEDB:System Database=D:\client manager\Security.
mdw;User ID=jbiggs;Password=153480;"
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open(ConnectionString)
set rs = Server.CreateObject("ADODB.recordset")
set rs2 = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT FirstName FROM Clients WHERE HomePhone = '" & hphone & "'",
Connection
If Not rs.EOF Then
Response.Write("Lead already exists. Please enter a new lead.")
Else
If fname <> "" and lname <> "" Then
rs.close
rs.open "SELECT * FROM [TZ List] WHERE [Area Code] = '" &
areacode & "'", Connection
timezone = rs("Time Zone")
sql = "INSERT INTO Clients ([Time Zones],areacode,LeadType,
customerordersaleID,IP,Source,FirstName,LastName,StreetAddress,City,State,Zip,
HomePhone,WorkPhone,Email,DebtAmount,MonthsBehind,ContactTime,Comment,
CreditorName1) VALUES ('" & timezone & "','" & areacode & "','" & leadtype &
"','" & orderid & "','" & ip & "','" & source & "','" & fname & "','" & lname
& "','" & street & "','" & city & "','" & state & "','" & zip & "','" &
hphone & "','" & wphone & "','" & email & "','" & debtamt & "','" & mosbehind
& "','" & contacttime & "','" & comment & "','" & creditor & "')"
Connection.Execute sql,recaffected
Response.Write("Lead submitted successfully!")
Else
Response.Write("Missing Information! Please complete
source, name, phone, email, debt amount and city/state or zip.")
End If
End If
rs.close
Connection.close
This will dump data into an ACCESS BE but not an Upsized to SQL Access BE
Any ideas why?