TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sanjeeb Sapkota
940
832
47.4k
Use Parameteri in OracleDataReader with StringBuilder in VB.
Feb 11 2016 11:24 AM
I have this code for retrive data from my oracle database:
Dim sb As New System.Text.StringBuilder
sb.AppendLine("SELECT * FROM NOULGH")
Using dar As Oracle.DataAccess.Client.OracleDataReader = Ibr.DataReader(sb.ToString)
While dar.Read()
page_no = dar("PRINT_NO").ToString()
page_no1 = dar("PAGE_NO1").ToString()
End While
End Using
Now i want to retrieve the data from Oracle database using parameter.
Private Function createCSVBody(ByVal reader As String)
Try
Dim sb As New System.Text.StringBuilder
sb.AppendLine("SELECT * FROM NOULGB WHERE PRINT_NO=@readerno")
sb.AppendLine(New OracleParameter("@readerno", OracleDbType.Char, reader, ParameterDirection.Input).ToString)
Using dar As Oracle.DataAccess.Client.OracleDataReader = Ibr.DataReader(sb.ToString)
While dar.Read()
page_no = dar("PRINT_NO").ToString()
page_no1 = dar("PAGE_NO1").ToString()
End Using
End Function
But it is not working for me. Can anybody help me?
Reply
Answers (
0
)
Develop a Multi UI Application from Start to Finish with C#
view sms messages from sim card in modem