<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="connect.asp"-->
<%
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set theTextFile = FSO.OpenTextFile("E:\webs\ranbaxyromania.ro\wwwroot\files\tb lViziteDoctori1.txt")
theTextLine=theTextFile.ReadLine
theFields=Split(theTextLine, VBTab)
While Not theTextFile.AtEndOfStream
mSQL = "INSERT INTO tblViziteDoctori("
mSQL = mSQL & "strDoctor,"
mSQL = mSQL & "strSpecializare,"
mSQL = mSQL & "strJointWorkWith,"
mSQL = mSQL & "strInput,"
mSQL = mSQL & "strFeedback,"
mSQL = mSQL & "strData,"
mSQL = mSQL & "strOra,"
mSQL = mSQL & "strInput2,"
mSQL = mSQL & "strProdusPrezentat,"
mSQL = mSQL & "strProdusPrezentat2,"
mSQL = mSQL & "strObservatii)"
mSQL = mSQL & "Values("
mSQL = mSQL & "'" & Replace(thefields(8),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(4),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(3),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(1),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(2),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(6),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(9),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(10),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(11),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(12),"'","''") & "', "
mSQL = mSQL & "'" & Replace(thefields(7),"'","''") & "')"
'It executes the SQL
MyConn.Execute (mSQL)
' Now we loop to the next record and start again until the end of the file.
Wend
' Close up to be tidy
theTextFile.Close
Set theTextFile = Nothing
MyConn.Close
Set MyConn = Nothing
%>
|