السلام عليكم جميعاً
اخواني انا عندي سؤال بخصوص الستريم ريدر وادخال البيانات داخل قاعدة البيانات عن طريق لووب
البرنامج عندي يقرا كل البيانات ويضعها بالداتا بيس وتكون كامله مافي اي مشاكل
بس كل ما خلص التنفيذ البرنامج يعطيني خطأ
Object reference not set to an instance of an object.
ارجو مساعدتي بتصحيح الكود
Do Until inputLines Is Nothing
inputLines = Sreader.ReadLine()
' Fill up the database with the below columns by its index and remove the spaces .Trim()
rcdSet.AddNew() 'Add data to the database line by line.
rcdSet.Fields("ORGX").Value = inputLines.Substring(6, 3).Trim()
rcdSet.Fields("ACCT").Value = inputLines.Substring(4, 19).Trim()
rcdSet.Fields("LOGO").Value = inputLines.Substring(27, 3).Trim()
rcdSet.Fields("SHRTNAME").Value = inputLines.Substring(29, 20).Trim()
rcdSet.Fields("CUSNO").Value = inputLines.Substring(43, 19).Trim()
rcdSet.Fields("ALTCUSFLG").Value = inputLines.Substring(67, 1).Trim()
rcdSet.Fields("ALTCUSNO").Value = inputLines.Substring(653 19).Trim()
rcdSet.Fields("ACCTTYP").Value = inputLines.Substring(84, 1).Trim()
count += 1
rcdSet.Update()
' Exit the sub if the reader reach the end of the file
'If Sreader.EndOfStream = True Then
' Exit Do
'End Ifياليت اسمع منكم الحل
مشكور مقدماً واتمنى اني ما اكون اطلت عليكم