•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,644 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,798 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 855 | Replies: 1
![]() |
This is code for retrieve data from table Results. The output must display to user via SMS. Now the problem is I cannot call all the data from table RESULTS.
Dim da As New SqlDataAdapter("Select * From Results Where Metric_Number='" & content1 & "'", conn)
Dim dst As New DataTable
Dim rsRow As DataRow
dst.Clear()
da.Fill(dst)
'Dim MessageType As Long
Dim datax As String
Dim data1 As String
Dim data2 As String
Dim data3 As String
Dim data4 As String
If dst.Rows.Count <> 0 Then
Dim daa As New SqlDataAdapter("Select Sub_Code FROM Results Where Metric_Number='" & content1 & "'", conn)
Dim dsts As New DataTable
dsts.Clear()
daa.Fill(dsts)
Dim rsws As DataRow
For Each rsws In dsts.Rows
data1 = (rsws.Item("Sub_Code") & vbCrLf.ToString)
data2 = (rsws.Item("Gred") & vbCrLf)
data3 = (rsws.Item("GPA") & vbCrLf)
data4 = (rsws.Item("CGPA") & vbCrLf)
datax = (data1 & data2 & data3 & data4)
Next
msgNotification(ccrNumber, datax)
RESULT NOW: It only displaying one row of the data(1-4)
How to select all data and then pass it to msgnotification
Urgent help need!!
Dim da As New SqlDataAdapter("Select * From Results Where Metric_Number='" & content1 & "'", conn)
Dim dst As New DataTable
Dim rsRow As DataRow
dst.Clear()
da.Fill(dst)
'Dim MessageType As Long
Dim datax As String
Dim data1 As String
Dim data2 As String
Dim data3 As String
Dim data4 As String
If dst.Rows.Count <> 0 Then
Dim daa As New SqlDataAdapter("Select Sub_Code FROM Results Where Metric_Number='" & content1 & "'", conn)
Dim dsts As New DataTable
dsts.Clear()
daa.Fill(dsts)
Dim rsws As DataRow
For Each rsws In dsts.Rows
data1 = (rsws.Item("Sub_Code") & vbCrLf.ToString)
data2 = (rsws.Item("Gred") & vbCrLf)
data3 = (rsws.Item("GPA") & vbCrLf)
data4 = (rsws.Item("CGPA") & vbCrLf)
datax = (data1 & data2 & data3 & data4)
Next
msgNotification(ccrNumber, datax)
RESULT NOW: It only displaying one row of the data(1-4)
How to select all data and then pass it to msgnotification
Urgent help need!!
if you are using VB go to VB forum and ask them you may find a lot of help
http://www.daniweb.com/forums/forum58.html
http://www.daniweb.com/forums/forum58.html
B.Sc Computer Science, Helwan University
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
Microsoft Student Partner
Personal blog http://ramymahrous.blogspot.com/
Arabic technical blog http://fci-h-ar.blogspot.com/
English technical blog http://fci-h.blogspot.com/
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
•
•
•
•
access ajax asp breach broadband code combo crime daniweb data data protection data transfer database developer development drive dropdownlist forensics government hacker hard hardware hitachi internet linux microsoft module msdn net news office reuse security software sql storage survey terabyte vista web wikipedia
- retrieve data from database into jsp(urgent)!!! (Oracle)
- retrieve data (MS SQL)
- how to store and retrieve data from cookies (ASP.NET)
- VB.Net: Problem Retrieve data from ListView (VB.NET)
- How to retrieve data from a dynamically generated radio button (ASP.NET)
- retrieve data by VB.Net (VB.NET)
- Retrieve the data from the url api (RSS, Web Services and SOAP)
Other Threads in the MS SQL Forum
- Previous Thread: For_xml_null_treatment
- Next Thread: Create table using recordset


Linear Mode