Run vb script on linux box -


this new me please bear me!

i have situation have form on website collects data , sends mysql table on web server. info sent mysql table on linux box web server, believe through kind of import script on linux box.

last week our linux server got hung , import scripts aren't working. have import.txt file need restart (i believe) not sure how it.

i researched on web see info .sh files.

thanks!

here's need run if helps:

public sub importpuborders() dim rscopy1 recordset, rscopy2 recordset, rscopy3 recordset dim strsql string, strcriteria string, strodbcdate string dim lngfound long on error goto errorhandler  set wrkodbc = createworkspace("odbcworkspace", "pubadmin", "abo1pra5", dbuseodbc) set mysqlconn = wrkodbc.openconnection("odbc;dsn=publications;desc=mysql odbc 3.51 driver dsn;database=publications;server=10.116.11.2;uid=pubadmin;password=abo1pra5;port=3306;option=3;stmt=;") mysqlconn.querytimeout = 180  strodbcdate = format(dateadd("d", -1, date), "yyyy-mm-dd") 'strodbcdate = "2009-03-11"  'copy records more.net pro dbsrvr set oawrkodbc = createworkspace("odbcworkspace", "sslagomysql", "k4-4js94nd", dbuseodbc) set oamysqlconn = oawrkodbc.openconnection("odbc;dsn=oa_generalpro;desc=mysql odbc 3.51 driver dsn;database=www_ago_mo_gov_ssl_data;server=db.kinetic.more.net;uid=sslagomysql;password=k4-4js94nd;port=3306;option=3;stmt=;")  strsql = "lock table orders_contacts read, orders_ids read, orders_items read, orders_order read" oamysqlconn.execute (strsql)      'check if there orders download     strcriteria = "date_format(orders_order.order_date, '%y-%m-%d') = " & chr(34) & strodbcdate & chr(34)     strsql = "select form_id orders_order " & strcriteria     oamysqlconn.execute (strsql)     lngfound = oamysqlconn.recordsaffected      'orders have been submitted , need downloaded     if lngfound >= 1         strsql = "select form_id, contact_id, date_format(order_date, '%y-%m-%d %t') order_date orders_order " & strcriteria         set rscopy1 = oamysqlconn.openrecordset(strsql)         while not rscopy1.eof             strsql = "insert orders_order (form_id, contact_id, order_date) " & _                 "values (" & rscopy1!form_id & ", " & rscopy1!contact_id & ", " & chr(34) & rscopy1!order_date & chr(34) & ")"             mysqlconn.execute (strsql)             rscopy1.movenext         loop         rscopy1.close          strsql = "select item_id, orders_items.form_id, pub_name, quantity " & _             "from orders_items inner join orders_order on orders_items.form_id = orders_order.form_id " & _             "where " & strcriteria         set rscopy2 = oamysqlconn.openrecordset(strsql)         while not rscopy2.eof             strsql = "insert orders_items (item_id, form_id, pub_name, quantity) " & _                 "values (" & rscopy2!item_id & ", " & rscopy2!form_id & ", " & chr(34) & rscopy2!pub_name & chr(34) & ", " & rscopy2!quantity & ")"             mysqlconn.execute (strsql)             rscopy2.movenext         loop         rscopy2.close          strsql = "select orders_contacts.contact_id, orders_contacts.form_id, org_name, first_name, last_name, address1, address2, city, state, " & _             "zip, email, phone, date_format(date_added, '%y-%m-%d %t') date_added " & _             "from orders_contacts inner join orders_order on orders_contacts.contact_id = orders_order.contact_id " & _             "where " & strcriteria         set rscopy3 = oamysqlconn.openrecordset(strsql)         while not rscopy3.eof             strsql = "insert orders_contacts (contact_id, form_id, org_name, first_name, last_name, address1, " & _                 "address2, city, state, zip, email, phone, date_added) " & _                 "values (" & rscopy3!contact_id & ", " & rscopy3!form_id & ", " & chr(34) & rscopy3!org_name & chr(34) & _                 ", " & chr(34) & rscopy3!first_name & chr(34) & ", " & chr(34) & rscopy3!last_name & chr(34) & _                 ", " & chr(34) & rscopy3!address1 & chr(34) & ", " & chr(34) & rscopy3!address2 & chr(34) & _                 ", " & chr(34) & rscopy3!city & chr(34) & ", " & chr(34) & rscopy3!state & chr(34) & _                 ", " & chr(34) & rscopy3!zip & chr(34) & ", " & chr(34) & rscopy3!email & chr(34) & _                 ", " & chr(34) & rscopy3!phone & chr(34) & ", " & chr(34) & rscopy3!date_added & chr(34) & ")"             mysqlconn.execute (strsql)             rscopy3.movenext         loop         rscopy3.close      else         docmd.hourglass false         dim rs0 recordset         set rs0 = currentdb.openrecordset("log_errors")         rs0.addnew             rs0("error_loc") = "zero publication orders submitted online " & strodbcdate             rs0("error_time") = now()         rs0.update         rs0.close         set rs0 = nothing     end if  strsql = "unlock tables" oamysqlconn.execute (strsql)  docmd.hourglass false  dim rs10 recordset set rs10 = currentdb.openrecordset("log_errors") rs10.addnew     rs10("error_loc") = "import publications completed without error"     rs10("error_time") = now() rs10.update rs10.close set rs10 = nothing  docmd.setwarnings true exit sub  errorhandler: docmd.hourglass false     dim rs2 recordset     set rs2 = currentdb.openrecordset("log_errors")     rs2.addnew         rs2("error_loc") = "procedure importpuborders"         rs2("error_num") = err.number         rs2("error_desc") = err.description         rs2("error_time") = now()     rs2.update     rs2.close     set rs2 = nothing  set rscopy1 = nothing set rscopy2 = nothing set rscopy3 = nothing docmd.setwarnings true 

end sub

you have use third party libraries linux not support vbscript. , sure has .txt extension? if vbscript?


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -