-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: pratsm
Message 1 in Discussion

Hi Guys
I have a problem with ADO 2.7, this code given below work perfectly file with vb6 but 
with vb.net 2003 its stops the execution when the records are inserted. The database 
is in Access 2002. Please Help me.

        OCON = New ADODB.Connection

        OCON.Open("Provider=Microsoft.Jet.OLEDB.4.0;" & _
                  "Data Source=" & Environment.CurrentDirectory & "\MailLOG.mdb;")


        iStr = "INSERT INTO Logs(Receipt_No, Receipt_Date_ANSI, Receipt_Date_Date, 
Customer_Code, Customer_Name, eMail, Sent, Sent_Date_ANSI, Sent_Date_Date, Error, 
File_Path, File_Date_Date) VALUES("
        iStr = iStr & "'" & TP_Main_Table.rows.item(Current_Row).cells(0).innerText & 
"', "
        iStr = iStr & "'" & (TP_Main_Table.rows.item(Current_Row).cells(1).innerText) 
& "', "
        iStr = iStr & "'" & (TP_Main_Table.rows.item(Current_Row).cells(1).innerText) 
& "' ,"
        iStr = iStr & "'" & 
TP_Main_Table.rows.item(Current_Row).cells(2).children(0).Value & "', "
        iStr = iStr & "'" & TP_Main_Table.rows.item(Current_Row).cells(2).innerText & 
"', "
        iStr = iStr & "'" & TP_Main_Table.rows.item(Current_Row).cells(3).innerText & 
"', "
        iStr = iStr & "" & IIf(MailSent = 0, True, False) & ", "
        iStr = iStr & "'" & Format(CStr(SUDateTime), "yyyy/mm/dd") & "', "
        iStr = iStr & "'" & CDate(SUDateTime) & "', "
        iStr = iStr & "" & ENO & ", "
        iStr = iStr & "'" & File1.Path & "', "
        iStr = iStr & "'" & File1.DateCreated & "')"

        OCON.Execute(iStr)

This last statement halts the execution of the program, ne ideas.


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to