%@ LANGUAGE=VBScript %>
<% Response.Buffer = True %>
Welcome to Thai Industry Network
<% IF Session("Common_Access") < 1 THEN
'msgbox "Invalid User Name OR Password",48,"Warning"
Response.Clear
'error logon warning
Response.Redirect "default2.asp"
END IF
%>
<%
Set IndustryNetSQL = Server.CreateObject("ADODB.Connection")
IndustryNetSQL.Open "industry", "sa", ""
sql = "select distinct(CompanyID), name, Category,CatID, offaddress, offzipcode from Company " & _
"order by CompanyID asc"
Set RS = IndustryNetSQL.Execute(sql)
Set IndustryNetSQL2 = Server.CreateObject("ADODB.Connection")
IndustryNetSQL2.Open "thaiindustry", "tinhosting", "tinhosting"
do while NOT RS.EOF
comID = rs("companyID")
name = rs("Name")
Category = rs("category")
catid = rs("catid")
offadd = rs("offaddress")
offzip = rs("offzipcode")
sql2 = "INSERT INTO Company ( name, Category, CatID, offaddress, offzipcode) " & _
"VALUES ('" & name & "','" & Category & "','" & catid & "','" & offadd & "','" & offzip & "')"
Set RS2 = IndustryNetSQL2.Execute(sql2)
RS.MOVENEXT
Loop
'Set fs = CreateObject("Scripting.FileSystemObject")
'Set com = fs.OpenTextFile("c:\company.txt",8,true)
'IF not RS.EOF THEN
' com.writeline(rs("companyID"))
' com.writeline(rs("companyID"))
' com.writeline(rs("category"))
' com.writeline(rs("catid"))
' com.writeline(rs("offaddress"))
' com.writeline(rs("offzipcode"))
' com.writeline(rs("offcity"))
' com.writeline(rs("offcountry"))
' com.writeline(rs("offtel"))
' com.writeline(rs("offfax"))
' com.writeline(rs("offcontactname"))
' com.writeline(rs("offemail"))
' com.writeline(rs("url"))
' com.writeline(rs("profile"))
' com.writeline(rs("clients"))
' com.writeline(rs("distributors"))
' RS.moveNext
' END IF
RS.movefirst
%>
|
|
|
<%= FormatDateTime (date, vbLongDate) %>
|
|
|
|
|
|
|
|
|
| CompanyID |
<%=RS("CompanyID")%> |
| Name |
<%=RS("name")%> |
| Category |
<%=RS("Category") %> |
| Catid |
<%=RS("CatID") %> |
| OffAddress |
<%=RS("offAddress") %> |
| OffZipcode |
<%RS("OffZipcode") %> |
| OffCity |
<%RS("OffCity")%> |
<%RS.moveNext %>
| CompanyID |
<%=RS("CompanyID")%> |
| Name |
<%=RS("name")%> |
| Category |
<%=RS("Category") %> |
| Catid |
<%=RS("CatID") %> |
| OffAddress |
<%=RS("offAddress") %> |
| OffZipcode |
<%RS("OffZipcode") %> |
| OffCity |
<%RS("OffCity")%> |
|
|
|