Zip your project and provide
Format is not easier to read
I will check and reply in few hours
I tried it a lot but lost.
My apologies, I am out of ideas and opting out for other Professionals to answer. Please wait. You will be notified by email as soon as any Professional joins you.
I would be happy to help you with your other questions though.
Thank you for your patience.
Hi there, my name is***** haven't tested this code, but give this a try:
Public Function SQLConnect() As String Dim db As New SqlConnection Dim reader As SqlDataReader Dim results() As Variant Dim count As Integer
Try db.ConnectionString = "Data Source=" & Hostname & __ ";Initial Catalog=mvf" &__ ";Persist Security Info=True" &__ ";User ID=" & Session("db_name") & __ ";Password=" & Session("db_pass") Dim query As New SqlCommand("Select series_uid from dosr_series where study_ref In (Select study_ref from dosr_study where study_uid = '" & arrResults(11, i) & "') and MODALITY !='SR", db) db.Open()
reader = query.ExecuteReader()
count = 0 While reader.Read() results(count) = reader("series_uid") count = count + 1 End While
Catch ex As Exception MessageBox.Show("Error while connecting to SQL Server." & ex.Message) Finally db.Close() End Try
Return "done" End Function