•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 426,314 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,323 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 VB.NET advertiser: Programming Forums
Views: 751 | Replies: 6 | Solved
![]() |
Start of one bit at a time.
-First find out how to open a web page and download something to your pc
-Then try to create an sql database
-Then try to insert something into the database
-Then try to combine it altogether
-First find out how to open a web page and download something to your pc
-Then try to create an sql database
-Then try to insert something into the database
-Then try to combine it altogether
I'm not a programmer. My attitude starts with ignorance, holds steady at conversation, and ends with a trip to the hospital. Get used to it.
•
•
Join Date: Jan 2008
Posts: 43
Reputation:
Rep Power: 1
Solved Threads: 4
Option Explicit
Dim adoConn As ADODB.Connection
Dim adoRst As ADODB.Recordset
Private Sub Command1_Click()'============================
Dim strConString As String
Dim strSQL As String
'assign connection string
strConString = "Provider=MS Remote;" & _
"Remote Server=http://192.168.1.1;" & _
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=MyRemoteDB;Persist Security Info=False"
'initialize connection object variable
Set adoConn = New ADODB.Connection
'open connection
adoConn.Open strConString, "admin", ""
strSQL = "Select * from Orders"
'initialize recordset object variable
Set adoRst = New ADODB.Recordset
With adoRst
.Open strSQL, adoConn, , , adCmdText
If Not .EOF Then
Do While Not .EOF
'read each record here
'...
.MoveNext
Loop
.Close
End If
End With
'destroy recordset object if necessary (or do it when you unload the form)
'Set adoRst = Nothing
'destroy connection object if necessary (or do it when you unload the form)
'Set adoConn = Nothing
End Sub Option Explicit
Dim adoConn As ADODB.Connection
Dim adoRst As ADODB.Recordset
Private Sub Command1_Click()'============================
Dim strConString As String
Dim strSQL As String
'assign connection string
strConString = "Provider=MS Remote;" & _
"Remote Server=http://192.168.1.1;" & _
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=MyRemoteDB;Persist Security Info=False"
'initialize connection object variable
Set adoConn = New ADODB.Connection
'open connection
adoConn.Open strConString, "admin", ""
strSQL = "Select * from Orders"
'initialize recordset object variable
Set adoRst = New ADODB.Recordset
With adoRst
.Open strSQL, adoConn, , , adCmdText
If Not .EOF Then
Do While Not .EOF
'read each record here
'...
.MoveNext
Loop
.Close
End If
End With
'destroy recordset object if necessary (or do it when you unload the form)
'Set adoRst = Nothing
'destroy connection object if necessary (or do it when you unload the form)
'Set adoConn = Nothing
End Sub
Dim adoConn As ADODB.Connection
Dim adoRst As ADODB.Recordset
Private Sub Command1_Click()'============================
Dim strConString As String
Dim strSQL As String
'assign connection string
strConString = "Provider=MS Remote;" & _
"Remote Server=http://192.168.1.1;" & _
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=MyRemoteDB;Persist Security Info=False"
'initialize connection object variable
Set adoConn = New ADODB.Connection
'open connection
adoConn.Open strConString, "admin", ""
strSQL = "Select * from Orders"
'initialize recordset object variable
Set adoRst = New ADODB.Recordset
With adoRst
.Open strSQL, adoConn, , , adCmdText
If Not .EOF Then
Do While Not .EOF
'read each record here
'...
.MoveNext
Loop
.Close
End If
End With
'destroy recordset object if necessary (or do it when you unload the form)
'Set adoRst = Nothing
'destroy connection object if necessary (or do it when you unload the form)
'Set adoConn = Nothing
End Sub Option Explicit
Dim adoConn As ADODB.Connection
Dim adoRst As ADODB.Recordset
Private Sub Command1_Click()'============================
Dim strConString As String
Dim strSQL As String
'assign connection string
strConString = "Provider=MS Remote;" & _
"Remote Server=http://192.168.1.1;" & _
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=MyRemoteDB;Persist Security Info=False"
'initialize connection object variable
Set adoConn = New ADODB.Connection
'open connection
adoConn.Open strConString, "admin", ""
strSQL = "Select * from Orders"
'initialize recordset object variable
Set adoRst = New ADODB.Recordset
With adoRst
.Open strSQL, adoConn, , , adCmdText
If Not .EOF Then
Do While Not .EOF
'read each record here
'...
.MoveNext
Loop
.Close
End If
End With
'destroy recordset object if necessary (or do it when you unload the form)
'Set adoRst = Nothing
'destroy connection object if necessary (or do it when you unload the form)
'Set adoConn = Nothing
End Sub
![]() |
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Send data on a serial port (C++)
- How to Pass data from JSP page to action class (JSP)
- SPI data transfer to Atmega8 by VB6 through parallel port (Visual Basic 4 / 5 / 6)
- Whats the eaiest way from transfering data from a PC to a Laptop? (Troubleshooting Dead Machines)
- Data loss in Type Conversion. (C++)
- data transfer from old HD (Windows NT / 2000 / XP / 2003)
- how to transfer data with my friend on a LAN (Networking Hardware Configuration)
- No Data Transfer, Despite Modem Connection (Windows NT / 2000 / XP / 2003)
Other Threads in the VB.NET Forum
- Previous Thread: Shell function
- Next Thread: Connecting To Oracle using VB.Net



Linear Mode