Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Sending And Retrieving Data From A Remote Database On Website


OK, wasn't sure how to title this, but here goes:

Using Visual Basic 6

Our setup:

1. A fire department dispatch center that recieves 911 calls, dispatches the fire trucks with an address

2. Our fire trucks with vehicle-mounted computers that are connected to the internet with cell phone PCMCIA cards.


What I want to do is this: When the dispatcher gets a 911 call, he types in the address in a textbox (in a VB app) and clicks UPDATE. When he clicks UPDATE, the address (along with 4 other fields that are auto-generated) are added as a record in a database located on our website (which is hosted by a hosting company, no physical access to the server). Then the fire fighters get in the truck, hit the REFRESH button on their touch screen, the REFRESH button sends an SQL statement to that database and retrieves the records which contain the address. NOTE: It would retrieve all records entered for that current day, not just the lastest one... For example " SELECT * FROM tblCurrentRuns WHERE DateRunEntered = (Todays Date) " Those records (probably a max of 20 with 5 fields each) would then populate a DataGrid control in VB6, after the DataGrid is populated I'm good to go with the rest of my coding.

Some Questions:

1. What is the best database format to store this data in? I tried using MySql which is installed on our current website, but was having trouble connecting to the database. (Not real familiar with MySql). REMEMBER: This is a single table, no relationships, 5 fields, at most 100 records or so that will be purged every few days.

2. We will be getting a new web hosting company, should I get Linux hosting (MySql databases) or Windows hosting (which has ASP, .Net, ODBC and DSN's, and MS Access Support, and MS SQL and MySQL databases?) My guess is Windows hosting

3. I want to do the entire program in Visual Basic, currently I have VB6. Would it be benefitial for me to get VB.NET?

4. I consider myself an "Advanced Beginner" in database terminology, is ADO the way to go or is something else better?

5. Security is not a major issue; if someone happens to retrieve info from the database, all they're seeing is some addresses (no names, phone numbers, etc.)

Anyone with comments and suggestions, I would surely appreciate them. I want to try and keep this a simple as possible; it's better for us firefighters that way...

Thanks!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Sending And Retrieving Data To Remote Database On The Web
OK, wasn't sure how to title this, but here goes:

Using Visual Basic 6

Our setup:

1. A fire department dispatch center that recieves 911 calls, dispatches the fire trucks with an address

2. Our fire trucks with vehicle-mounted computers that are connected to the internet with cell phone PCMCIA cards.


What I want to do is this: When the dispatcher gets a 911 call, he types in the address in a textbox (in a VB app) and clicks UPDATE. When he clicks UPDATE, the address (along with 4 other fields that are auto-generated) are added as a record in a database located on our website (which is hosted by a hosting company, no physical access to the server). Then the fire fighters get in the truck, hit the REFRESH button on their touch screen, the REFRESH button sends an SQL statement to that database and retrieves the records which contain the address. NOTE: It would retrieve all records entered for that current day, not just the lastest one... For example " SELECT * FROM tblCurrentRuns WHERE DateRunEntered = (Todays Date) " Those records (probably a max of 20 with 5 fields each) would then populate a DataGrid control in VB6, after the DataGrid is populated I'm good to go with the rest of my coding.

Some Questions:

1. What is the best database format to store this data in? I tried using MySql which is installed on our current website, but was having trouble connecting to the database. (Not real familiar with MySql). REMEMBER: This is a single table, no relationships, 5 fields, at most 100 records or so that will be purged every few days.

2. We will be getting a new web hosting company, should I get Linux hosting (MySql databases) or Windows hosting (which has ASP, .Net, ODBC and DSN's, and MS Access Support, and MS SQL and MySQL databases?) My guess is Windows hosting

3. I want to do the entire program in Visual Basic, currently I have VB6. Would it be benefitial for me to get VB.NET?

4. I consider myself an "Advanced Beginner" in database terminology, is ADO the way to go or is something else better?

5. Security is not a major issue; if someone happens to retrieve info from the database, all they're seeing is some addresses (no names, phone numbers, etc.)

Anyone with comments and suggestions, I would surely appreciate them. I want to try and keep this a simple as possible; it's better for us firefighters that way...

Thanks!

Remote MDB Data Retrieving...
i have an MDB file on my hd..and i want to upload it to a server and to see how this thing works
does it requires some special features on the servers????
or just to upload it like a normal file?

and lets say i've uploaded it....what do i need to change in this code to be able to read data from it??:
----------------
Dim MyConn As ADODB.Connection
Dim MyRecSet As ADODB.Recordset

Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:MyAccessDB.mdb;"
MyConn.Open
------------------

u guess i need to change the "source"...but to what???? (dont think a url will fit in)

Help With Program Sending Data To Website.
i'm working on a program that will take data entered into a text field lets say txtURL then send it to a website like google and submit the info. Any help would be appreciated I am somewhat new to VisualBasic and programming.

Problem Sending Data To Website
Hello, I'm trying to automatically upload an image to imageshack.us, but I can't get it to work.

I could easily send data to Google and forums, but somehow it doesn't work with ImageShack. I get a Run-timer error '438' - Object doesn't support this propery or method on the line: WebBrowser1.Document.All("fileupload").Value = "C:myfile.jpg"

Also, I'm not really sure if "fileupload" and "submit" are the correct names, but I couldn't find anything else in the source code of the webpage.

Does anybody know how to upload an image to ImageShack by code?


VB Code:
Private Sub Form_Load()    WebBrowser1.Silent = True    WebBrowser1.Navigate "www.imageshack.us"End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)    WebBrowser1.Document.All("fileupload").Value = "C:myfile.jpg"    WebBrowser1.Document.All("submit").ClickEnd Sub

Problem Sending Data To Website
Hello, I'm trying to automatically upload an image to imageshack.us, but I can't get it to work.

I could easily get it to work with Google and forums, but somehow it doesn't work with ImageShack. I get a Run-timer error '438' - Object doesn't support this propery or method on the line: WebBrowser1.Document.All.Item("fileupload").Focus

Does anybody know how to upload an image to ImageShack by code?


Code:
Private Sub Form_Load()
WebBrowser1.Silent = True
WebBrowser1.Navigate "http://www.imageshack.us"
End Sub


Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
WebBrowser1.Document.All.Item("fileupload").Focus
SendKeys "C:myfile.jpg"
Sendkeys "{ENTER}"
End Sub

Retrieving Data From Txt File, And Calling Components From Remote Functions
Im developing a project wich will retrieve data from a txt, wich will be a playlist for movies, swfs and such, and use that data to play the movies properly.

I have been given help on this subject, but as it turns out, Ill need something different.

The txt is like this:

wmp:d:movie.avi,30
wmp:d:movie2.avi,30
iex:wmp:d:movie.swf,15

the first statement (wmp, iex) will determine what component to play the file. the second statement is the movie path, and the third is the duration of the playback.
From forums, I was given tutelage on using split function so I got something like this:


Code:
Private Function loadfile(folder As String, filename As String)
Dim hFile As Long
hFile = FreeFile
Open folder & "/" & filename For Input As #hFile
Form1.Text1.Text = Input$(LOF(hFile), hFile)
Close #hFile
End Function

Private Sub Form_Load()
loadfile App.Path, "teste.txt"
Dim splits() As String, splits2() As String, temp As String
splits() = Split(Text1.Text, vbNewLine)
For num = 0 To UBound(splits()) - 1
splits2() = Split(splits(num), ":")
splits2(1) = splits2(1) & ":" & Split(splits2(2), ",")(0)
splits2(2) = Split(splits2(2), ",")(1)
Next num

End Sub
this will split the file correctly. however, i havent got much idea how to proceed on the project. I need now a way to actually play the files. Each line read from the txt corresponds to a sequential segment of the playlist.

I need to first store all the values from the txt into a variable. The way it is now, every time Next num occurs, the variables splits2()´s will change to match the next line on the txt.

Im not sure on how to proceed, to actually load the corresponding component and play the file, and after playback is done after x seconds, move on to the next file. I can use play functions on components like wmp, but I dont know how to "call" a desired component from a function specified in the main form of the project. Also I dont know how to "wait x seconds to stop playback then move on to the next line".

Thanks

Retrieving Data From Txt File, And Calling Components From Remote Functions
Im developing a project wich will retrieve data from a txt, wich will be a playlist for movies, swfs and such, and use that data to play the movies properly.

I have been given help on this subject, but as it turns out, Ill need something different.

The txt is like this:

wmp:d:movie.avi,30
wmp:d:movie2.avi,30
iex:wmp:d:movie.swf,15

the first statement (wmp, iex) will determine what component to play the file. the second statement is the movie path, and the third is the duration of the playback.
From forums, I was given tutelage on using split function so I got something like this:


VB Code:
Private Function loadfile(folder As String, filename As String) Dim hFile As Long hFile = FreeFile Open folder & "/" & filename For Input As #hFile    Form1.Text1.Text = Input$(LOF(hFile), hFile) Close #hFile End Function  Private Sub Form_Load() loadfile App.Path, "teste.txt" Dim splits() As String, splits2() As String, temp As String splits() = Split(Text1.Text, vbNewLine) For num = 0 To UBound(splits()) - 1     splits2() = Split(splits(num), ":")     splits2(1) = splits2(1) & ":" & Split(splits2(2), ",")(0)     splits2(2) = Split(splits2(2), ",")(1) Next num  End Sub


this will split the file correctly. however, i havent got much idea how to proceed on the project. I need now a way to actually play the files. Each line read from the txt corresponds to a sequential segment of the playlist.

I need to first store all the values from the txt into a variable. The way it is now, every time Next num occurs, the variables splits2()´s will change to match the next line on the txt.

Im not sure on how to proceed, to actually load the corresponding component and play the file, and after playback is done after x seconds, move on to the next file. I can use play functions on components like wmp, but I dont know how to "call" a desired component from a function specified in the main form of the project. Also I dont know how to "wait x seconds to stop playback then move on to the next line".

Thanks

Sending Data Through Visual Basic To A Website
Hey,

I have created an RSS FEED program for communities, such as vBulletin - that reads from a specified location (such as the http://www.xtremevbtalk.com/external.php?type=rss2) all records and organize it real nice [well, interface isn't designed yet but it will be ].
What I want to add is a 'quick reply' feature, like there is at the bottom of this page right here.
Is it possible to send the message using visual basic to the a php page with the right parameters?
Only theoretical example needed ofcourse heh.

Would be great if anyone could help me out with it.
Thanks in advance,
Kedmyster

Sending And Retrieving Data Using Comm Port
Hello,

Is there a possible way to send a data to a mechanism through comm port/serial port and at the same time receiving another data back to vb from the mechanism?

Thanks and Regards
GX

Sending And Retrieving Data Using Comm Port
Hi,

Is there a possible way to send a data to a mechanism through comm port and at the same time receiving another data back to vb from the mechanism?

Thanks



Edited by - TCC on 1/30/2004 10:31:32 PM

Sending Data To Remote .MDB
I want to send data to a remote MySQL DB but we all know how hard this is without your IP being allowed to connect. SO i've thought of this...

Sending stuff to a .MDB online then getting a code online to take new information and save it into my MySQL database?? would this work? anyone see any problems with it???

Retrieving Data From The Database
Hi

I am using the following code for retrieving the letters from my database, but it does not show the letters unless I start to compile the code from that tab. Can anyone see the reason?

Thanks


Code:

Private Sub Form_Load()
Dim SQL1 As String
Dim RS As Recordset
'Open "c: est.txt" For Append As #1
Set DB = OpenDatabase(App.Path & "/db13.mdb")
SQL1 = "Select Distinct Journal_Letter from Article"
Set RS = DB.OpenRecordset(SQL1)

For i = 1 To Label10.UBound
Unload Label10
Next i

i = 0
RS.MoveFirst

Do While Not RS.EOF


i = i + 1
Load Label10(i)


Label10(i).Left = Label10(i - 1).Left + (Label10(i - 1).Width * 1.5)
Label10(i).Top = 2500

Label10(i).Caption = RS.Fields(0)
Label10(i).Visible = True

RS.MoveNext


Loop

End Sub

Retrieving Data From Database
Hi..
I am currently being worked on a project and ? have just finished the calculation code part.Now I have a problem.Let me explain ...
well...  firstly the user is assigning  Safety factor "SF" (e.g 2 means two times safe !)and then

 the user is being asked to select a profile from combo box which is connected to my databse and after selection yields such datas automatically in a seperate text boxes and being asked to input some other datas.Let the selected values as folows.(here is the important part..)
A
I
y
r


(...this is random user selection.So user may select a profile wich gives higher safety coefficient Z for the certain purpose.pls let me explain this part at the end of my quesiton...)


those processed by the calculation code ? ve already written and gives output such as

X
Y
Z

Apart from the others  here Z means whether the selection is satisfactory or not  in other words means  relative Safety coefficient and gives this idea by its value.If it is too high(e.g 233)  from prescribed value of "SF"( the user had selected 2)  then we need to find the profile which gives the lowest but greater value of Z so we must make a trial error loop until it slightly differs from SF(but greater of course!!!! e.g Z= 6).


So  the problem is here ..I have to try all available profiles (each has its own A I y r values ). In my database  there are about 50 profile (means 50 times trial with my calculation code ...)

As a summary we must get 50 Z values after trial loops and selecting the profile wich gives the lowest Z value among them.
let SF=2
e.g

1 trial   
... DATABASE ...Selection of 1st profile.....processing of profile datas with my code......Obtaining Z1 value.....

2nd trial
DATABASE ...Selection of 2nd profile.....processing of profile datas with my code......Obtaining Z2 value.....
.
.
.
50th trial DATABASE ...Selection of 2nd profile.....processing of profile datas with my code......Obtaining Z50 value.....

now maybe by making of array of Z values  Z1 ,Z2 ,Z3 .....Z50 values

assume that Z36 is min value( e.g 6 also greater than SF=2 !!!!... Now ? need that profile which gives this Z36.!!!!


Well ? tryed to explain main idea lies  backgound of my problem .Can any one help me  to build the required code for this purpose..Thanks in advance...

(of course if it is not clear ? can give another example...).

Thanks in advance...
Enver SUN



Retrieving Data From Protected Database
I'm writing a program which let the user to retrieve data from a protected database (.mdb). I've tried using MS Remote Data Control by entering the UID and Password on the Properties, but still could not retrieve the data.

Is there any way which prompt the user to enter Password once the program is being execute?

I found the following code on a site provided by a member but I'm not sure where to put them. Should it be in Form Load or Declaration part?

{oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:somepathmydb.mdb;" & _
"Uid=admin;" & _
"Pwd="
}

Retrieving Data From The Database Using SQL Query
I have a form that retrieves data from the database and shows the record fields in text boxes...

I have retrieved data using the properties window.... I called the datasource the reuiqred database and have assiged a datafield...this works expect it returns the first record in the table...I want it to return the data for a certain ID no (which is in textbox 'IDtxt' on the form)

So I created the following query with in the command:

SELECT * FROM customer WHERE (customerID = 'frmUpdate.IDtxt.Text')

this does not work however if I change 'frmUpdate.IDtxt.Text ' to 2 it does work and returns the 2 record in the table...


what am I doing wrong in the above query?????

Connecting To And Retrieving Data From Database
i am developing an e-dictionary for Japanese-Malay language. i have a table called words.mdb (i'm using MS Access) with 2 tables: JapToEng and MalToEng - each for Japanese-to-English and Malay-to-English respectively. the JapToEng table contains Japanese words (wordRomaji) with its English translation (wordEnglish), and the MalToEng (wordMalay) table contains Malay words with its English translation (wordEnglish). both tables are related by the English words.

in my vb design for Malay-to-Japanese translation, i have a textbox for the user to enter the Malay word they want to translate, called txtWordM. a command button, called cmdTranslateM has to be clicked after the user enter the word to get its Japanese translation. the system will then search the English translation of the Malay word in the MalToEng table, and search the English word in the JapToEng table to retrieve the Japanese translation of the Malay word. the result will be displayed on another textbox called txtTranslateM.

the same procedure for the Japanese-to-Malay translation, only that it has different control names.

can anybody help me by telling the steps from the beginning, how to connect my system to the database (words.mdb), retrieve the translation and display the translation, so that this system will work.

i guess the query i have to use is this:
"SELECT JapToEng.wordRomaji FROM JapToEng WHERE MalToEng.wordMalay=" & wordMalay & " AND MalToEng.wordEnglish=JapToEng.wordEnglish;"

i have tried many codings but doesnt seem to work. please help me~~~~

How To Store A Website Data Like The URL Name From History Folder To The Database.
Hi,
How to store a website data like the URL name from history folder to the database.
Or is there any other way to keep the track of the websites visited in the db.

sushil.

Retrieving Data From And Incrementing Fields To A Database
I am a novice VB programmer who has had 2 college classes on the subject. I am writing a VB program that will calculate averages for golf scores and statistics. I have created a database through Microsoft Access. Currently, I have my program able to add a new entry based on the user's input and display the results based on the entry.

The problem I am running into is that I want to calculate a running total for the number of rounds played, round score, putts, number of fairways hit, and number of greens hit. I need this running total because I want to display the averages for these statistics.

I want to take the running total score, putts, fairways, and greens, and divide them by the number of rounds played. To be able to do this, I need my program to read the totals from the previous record before inserting and calculating a new record.

If anyone has any suggestions on how I can read in certain fields from the previous record, I would greatly appreciate it! Thanks for your help!

Retrieving Data From Access Database To VB Form
Hello there. I am creating a basic Client/Server project that i am creating using Visual Basic 6. I am using Winsock on both client and server. Both are situated on the same computer. The project is for a booking system

My problem is this I have a combo box on the client form called cmbDay, which has a list of the days. When i click on a day of the week it is meant to bring through any travel routes for that particular day that are available but it is not doing this.

The database is called "Hover" and the table that the details are stored in is called "Journey".
The table is made up like this
Journey_ID, Hovercraft_ID, Day, Depart, Arrive and Cost

Here is the code that i am using


Private Sub cmbDay_Click()

Dim query As String
Dim Parameter As String
Dim Day As Integer

Dim db As New ADODB.Connection
Dim rec As New ADODB.Recordset

db.ConnectionString = "Data Source =Hover;"
db.Open

query = "SELECT * From Journey" Set rec = db.Execute("SELECT * FROM journey")



If rec.RecordCount > 0 Then
rec.MoveFirst
While Not rec.EOF
If Day = rec.Fields(3).Value Then
frmBooking.cmbRoute.Text = rec.Fields(0).Value
frmBooking.cmbDeparture.Text = rec.Fields(3).Value
frmBooking.cmbArrival.Text = rec.Fields(4).Value

End If
rec.MoveNext
Wend
Else
MsgBox "no route found for that day", vbInformation
End If
End Sub

I hope this make sense to somebody. I have only recently started to program using Visual Basic 6. If anybody could help me i would be very grateful

Thanks
Warney316

Problem When Retrieving Data From Access And Insert Into SQL Database
Hi,

Iam trying to retrive data based on certain criteria and insert into data base in sql server of same structure as access database.

Everything works fine on a workstation with win 98 OS. But when I run the exe on the server it self (win 2000 server) I face the below runtime error:
Runtime Error ‘-2147467259’ ODBC – call Failed

Below is the part of code where I encountered the error. Similar to below statements I have multiple selection & inserts. Errors occurs some time for first table insert and some times 2/3rd.

sql1 = "select * from Document_Master"
rsSql1.Open sql1, dbconn, adOpenForwardOnly, adLockReadOnly
If rsSql1.EOF = False And rsSql1.BOF = False Then
Do While Not rsSql1.EOF
sql2 = "Select * from [" & mysqlconn & "]. [Document_Master]
where Location_Code = '" & rsSql1!Location_Code & "'

rsSql2.Open sql2, dbconn
If rsSql2.EOF = True And rsSql2.BOF = True Then
SQL = "Insert into [" & mysqlconn & "].[Document_Master]
select * from Document_Master where Location_Code = '"
& rsSql1!Location_Code & "'
dbconn.Execute SQL

rsSql2.Close
rsSql1.MoveNext
Loop
End If
rsSql1.Close


Should I go for DTS? If I incorporate script generated by DTS Schedule, after creating package for my application will it work on a PC with out VB & MS SQL Server??

Please help!

Thanks

Retrieving Data From Database Into Grid Control [visual Basic]
hi

1.i want to know how to use the DBGrid controls in vb.
2.how to insert the data into the rows
3.can we directly get the records from the data base like access
4.how can i select the rows using Shift+Down key

Let me have the solution soon.

Retrieving A Table From A Website Using DOM?
Can anyone explain to me how to retrieve a table's data from HTML and display it in a frame in VB. I know you need to use the DOM but Im not quite sure how.

Can anyone help please?

Retrieving Only Part Of A Website
Hello. Anyone know how to accomplish this, using the Webbrowser control?

Transfering Data To Remote Database
Hello,
I have a problem in uploading data from a local access database to a remote access database which is some 130 mb.Both databases are on the same local area network.
In the upload routine I have written user can select the paths for source and destination databases.It works fine when the two systems are in same building.But if I want upload data to a distant system my program is not responding.I used simple recordset operations i.e i will select the corresponding fields from source database and upload to corresponding fields in the remote database.
Can any body expain this problem?
thankx
rlinga

Get Data From Remote MySQL Database
I'm writing a set of applications that run on multiple clients' PCs and need to access a remote (server-side) MySQL database.

Having an application running on the server and listening for connections is not an option.

Having direct connections from the apps to the database (such as with myODBC, myVBQL) is also not an option.

The only method I have worked out is to browse to a php webpage in a hidden webbrowser object, sending user/password for authentication...

Then if the user is verified, the webpage outputs the required data to hidden html form objects. The number of fields is variable so first it has to send the number of following objects...

Then the vb app reads this html code and strips out the data.

HELP! This is horribly messy and inefficient, but I can't think of any other way to get it to work given those 2 limitations. Coding everything as php/webpages would be even worse and almost certainly wouldn't work anyway.

How else can I do this? Thanks!

Connect To Remote MySQL Database And Get Data
Hi,

Im using Visual Basic 6.

I own and run a website which is powered by a MySQL database. It contains tutorials and stuff like that.

Now what I want to do is to create a program which will connect to that database and will then pull data from it. The first thing I want to pull is the tutorial categories which are in a table called tutorial_cat
Id like them to then be listed in an options box or something...

How do I go about doing this?

Thanks

Saving Data In A Datagridview To The Database From A Remote Object
 Hello every one hopefully I can get some help with this before I get fired for not being able to do my job.
So I have this project im working on by myself I might Add. I have to create a Data Management System for a
big asphalt company. Im having Problems figuring out how to save the data that changes in the datagridview
back to the object that sent it the dataset in the first place. I can populate the Datagridview remotley but I cant seem to figure out how to save the data back to the database remotely. PLease any help is greatly appreciatred.

Heres the Code for the remote Object


Code:Imports System.Data.SqlClient
Imports System.Data
Imports System

Public Class Ac
    Inherits MarshalByRefObject

    Public Appstring As String = System.Configuration.ConfigurationManager.AppSettings("ConnectionString")

#Region " Private Member Variables "

    Private mintAcIndex As Integer
    Private mstrName As String
    Private mstrDescription As String
    Private mstrItemNumber As String
    Private mdecPrice As Decimal
    Private mintID As Integer

#End Region

#Region " Public Accessors "

    Public Property AcIndex() As Integer
        Get
            Return mintAcIndex
        End Get
        Set(ByVal Value As Integer)
            mintAcIndex = Value
        End Set
    End Property

    Public Property Name() As String
        Get
            Return mstrName
        End Get
        Set(ByVal Value As String)
            mstrName = Value
        End Set
    End Property

    Public Property Description() As String
        Get
            Return mstrDescription
        End Get
        Set(ByVal Value As String)
            mstrDescription = Value
        End Set
    End Property

    Public Property ItemNumber() As String
        Get
            Return mstrItemNumber
        End Get
        Set(ByVal Value As String)
            mstrItemNumber = Value
        End Set
    End Property

    Public Property Price() As Decimal
        Get
            Return mdecPrice
        End Get
        Set(ByVal Value As Decimal)
            mdecPrice = Value
        End Set
    End Property

    Public Property ID() As Integer
        Get
            Return mintID
        End Get
        Set(ByVal Value As Integer)
            mintID = Value
        End Set
    End Property

#End Region

#Region " Public Methods "
    Public Function GetAllRecords(ByVal Procedure As String, ByVal TableName As String, ByVal IsDirty As Boolean) As DataSet
        Dim Da As SqlDataAdapter = New SqlDataAdapter
        Dim Ds As DataSet = New DataSet
        Dim SqlConn As New SqlConnection(Appstring)
        Dim cmd As New SqlCommand


        Try

            With cmd
                .Connection = SqlConn
                .CommandType = CommandType.StoredProcedure
                .CommandText = Procedure
            End With
            Da.SelectCommand = cmd
            Da.Fill(Ds, "Results")
            If IsDirty = True Then
                If Ds.HasChanges = True Then
                    Ds.AcceptChanges()
                    Da.Update(Ds)
                End If
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        GetAllRecords = Ds

    End Function

    Public Function UpdateRecords(ByVal Procedure As String, ByVal ID As Integer, ByVal StrucName As Structures.structAc)

        Dim Da As SqlDataAdapter = New SqlDataAdapter
        Dim Ds As DataSet = New DataSet
        Dim SqlConn As New SqlConnection(Appstring)
        Dim cmd As New SqlCommand

        'Declare Structure so that Values that have been changed can be passed back
        'to the database in the form of Parameter values
        With StrucName
            Me.mintID = .mintID
            Me.mstrDescription = .mstrDescription
            Me.mstrItemNumber = .mstrItemNumber
            Me.mstrName = .mstrName
            Me.mintAcIndex = .mintAcIndex
            Me.mdecPrice = .mdecPrice
        End With

        With cmd
            .Connection = SqlConn
            .CommandType = CommandType.StoredProcedure
            .CommandText = Procedure
            .Parameters.AddWithValue("@ID", mintID)
            .Parameters.AddWithValue("@Description", mstrDescription)
            .Parameters.AddWithValue("@ItemNumber", mstrItemNumber)
            .Parameters.AddWithValue("@Name", mstrName)
            .Parameters.AddWithValue("@Price", mdecPrice)
            .Parameters.AddWithValue("@AcIndex", mintAcIndex)
        End With
        UpdateRecords = Ds

    End Function
    Public Function GetTableNames(ByVal Procedure As String) As ArrayList
        Dim values As ArrayList = New ArrayList()
        Dim Reader As SqlDataReader
        Dim cmd As New SqlCommand
        Dim SqlConn As New SqlConnection(Appstring)
        With cmd
            .Connection = SqlConn
            .CommandType = CommandType.StoredProcedure
            .CommandText = Procedure
        End With
        SqlConn.Open()
        Reader = cmd.ExecuteReader()
        While Reader.Read()
            values.Add(Reader.Item("TABLE_NAME").ToString())
        End While

        SqlConn.Close()
        Reader.Close()
        Return values

    End Function
#End Region




End Class



'--------------------------------------------end Object---------------------------------------------------

'And My code for the method that calls the Object


Imports DAO
Imports DAO.Structures
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Tcp
Imports System.Configuration
Public Class frmDataCenter
    Inherits Windows.Forms.Form
    Dim ConncetionAc As Ac

    Dim Connected As Boolean = False
    Dim AppString As String = System.Configuration.ConfigurationManager.AppSettings("DB")
    Private Sub btnDMSHome_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDMSHome.Click
        frmMain.Show()
        Me.Close()

    End Sub

    Private Sub frmDataCenter_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        If frmMain.IsOpen = True Then
            frmMain.Show()
        End If
    End Sub


    Private Sub frmDataCenter_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    End Sub

    Private Sub btnDbConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDbConnect.Click
        Try
            RemotingConfiguration.Configure("DataManagement.exe.config", False)
            'Todo Exception Handleing


            'instantiate the remote class
            ConncetionAc = New Ac
            Connected = True
            Me.btnDbConnect.BackColor = Color.DarkGreen
            Me.btnDbConnect.ForeColor = Color.Black
            Me.btnDbConnect.Enabled = False
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        Me.cboTableNames.DataSource = ConncetionAc.GetTableNames("usp_GetallTableNames")

    End Sub

    Private Sub btnViewRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewRecords.Click
        If Me.btnDbConnect.Enabled = True Then
            MsgBox("You Must Be Connected to the Database to View records", MsgBoxStyle.OkOnly)
        End If
        Me.dgViewRecords.DataSource = ConncetionAc.GetAllRecords(TableNameSelected(), "Ac", False)
        Me.dgViewRecords.DataMember = "Results"
    End Sub

    Public Function TableNameSelected() As String
        'Determine Which table name the user selected and return the Procedure
        'Name appropriatee for that table name
        Dim TableName As String = Me.cboTableNames.Text
        Dim ProcedureName As String = ""
        Select Case TableName
            Case "Ac"
                ProcedureName = "usp_Ac_getall"
        End Select
        Return ProcedureName
    End Function

    Private Sub btnSaveRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSaveRecords.Click
        Me.dgViewRecords.DataSource = ConncetionAc.GetAllRecords(TableNameSelected(), "Ac", True)
        Me.dgViewRecords.DataMember = "Results"
    End Sub
End Class

 

Conecting To A Remote MySQL Database And Displaying The Info In A Data Grid
Im makign a program with a datagrid to display the Name, Email and various other fields of a mysql table. How can i have the program connect to the database and show the information?

Thansk heaps!

Sending Data To Database/txt/flexgrid
i have 1 label and 1 flex grid.

the label has the player name. the flex grid has the user scores. there will be a button for the user to press to get the next screen, where the database will be. but what i need to know is how can i send the data to a database/spreadsheet/another flexgrid/ txt file.

Remote Connecting To A Website From The Desktop
Hi guys,

I'm totally new to Vb6/vb.net. I have been ask to create a program as a learning curve that does the following:

1. the program will need to be installed on the client machine and should be able to sit on the system when the client minimize the program.

2. After installing the program, the client start the and he is asked to input an username and a password then click OK.

3. the website will reply to by telling him how much his a consume on his allocated bandwidth.

4. the program will update every hours to tell him how much bandwidth he has left.

5.He should also be able to browser images stored on the website without having to use his browser just by inputing the image reference number.

I have a good understanding of Java (intermediate).

I really need this guys, Please help.

Clicking A Form's Button On A Remote Website
Hello,

Is there any way that I could create an Application that would navigate to a certain website, find the location of a button, and click it?

Navigation is easy enough, it's the finding and clicking of the button that has me stumped. Is it even possible?

Thanks.

Retrieving Remote Hardware Address
Hi,

I am creating a Client/Server program. I want to be able to authenticate a Client via its hardware address. Please note that I don't want the Client to just send me its hardware address as data, as any program can spoof this.

SendARP works for XP, 2K, etc. but not for 9x and NT 4. I want something that is compatible on them too.

If this is not possible, can someone suggest some other viable authentication schemes?

Thanks a lot,
Wild Thing

Retrieving Remote Logged On User
Hi
Im in NT, how do I retrieve the username of the person currently logged on to machchine X from Machine Y, across an NT/XP network, do I need to check the logon server ? or can i just send a request to the machine directly ? Any ideas ? thanks a lot
--
Half

Retrieving A File From A Remote Server With VB 3.0
Here's what I'm trying to do, I have a remote server, which applications are coded in VB 6.0. A text file is stored there.

I want to retrieve that text file, from the application that was created using VB 3.0 (which is stored in the terminal). The reason for this is that the PDA used in this system only suppports VB 3.0, therefore, parsing the file as an XML format is out of the question.

Any help would be appreciated, thank you!!

Nigel

Sending Excel Template Data To An Access Database
I am working with Excel 2002 and I have developed a template for data input and then used the template wizard to dump the data into an access database. I am using “record macro” for users to submit the information. One of the functions I want the macro to record is to save the file. When I do this manually, a pop-up box appears called “template file – save to database” and it says “the contents of this workbook have not been saved as a record in the database. What would you like to do? create a new record; continue without updating “ I want the program to choose “create a new record”. I can do this manually, but when I go to the recorded macro, it only has: Activeworkbook.save
And when I run the macro, it does not transfer the data into my database, so it looks like it defaults to “continue without updating”

I would like to add the code to choose “create a new record” in that pop-up box, but have no coding experience. Can anyone help me? Thanks.

Retrieving DSNs Created On Remote PC With VB Code
Hello everyone
I want to retrieve the list of DSNs created on the Remote PC (connected on LAN) through VB code.
I cannot use any tool for that and i must do it using VB 6 code.
Plus i don't want any code and installation on that Remote PC whose DSNs are to be accessed. All coding must be on local PC.

I have retrieved the list of local DSNs by using following code but unable to retrieve DSNs remotely.

Dim odbcTool As New ODBCTool.Dsn
Dim Dsn() As String, i As Long
If odbcTool.GetDataSourceList(Dsn()) Then
' a True return value means success
lstDataSources.Clear
For i = 0 To UBound(dsn)
lstDataSources.AddItem dsn(i)
Next
Else
' a False value means error
MsgBox "Unable to read DSN list", vbExclamation
End If




Thanks in advance

Sending Data To Populate Multiple Columns In Database Table
Hi all! Hope ya had a good christmas!!

Im trying to send data from one textbox to an access database.

For example, the textbox will have information displayed as follows:

firstname1 lastname1 age1
firstname2 lastname2 age2
firstname3 lastname3 age3

etc....

The data has to go to corresponding table columns in the database.

Does anyone know how I can do this?

Thanks a lot all!

Sending Varriable To Website
Dear all,
This is my first post.I want to send username and password to one webpage and forces that page to submit automatically.
Is it posible

Sending Text To A Website
Hi.
I'm trying to send text to a website, (here ).
I need the program to go there, (without opening a brower), fill out the text boxes and hit Submit.
Im using visual basic 6.0.
Any suggestions on how i can do this? I'm not aware a way to do this through vb 6.0, any help is appreaciated.
(If i could do this with inet, tha'd be great )

Sending VB6 Text1.Text To A Website Txt
i need help sending Text1.Text to a website rs2.txt Text file.
i have no idea how to do this any help?

Sending And Retrieving Email
I want to create an application that sends and retrieves email from a contact database.

The program will be designed using MS Access as that is what I am familiar with. I keep meaning to get round to learning VB but I don't know where to start.

Questions:

1. Any pointers on what I need to send/retrieve emails?

2. I use some vba in the MS Access environment. With this in mind, how long would it take me to learn to use VB6?

Thanks,

Jon

Sending A Request To A Website Without Opening A Browswer?
ok i know about the shell command

Shell "explorer http://localhost/"


what if i dont want to open a browser? say i just want to send some get vars to a PHP script and have it run?

possible?

Automation Of Sending Text File Thr Secure Website
Hi,

I have to send daily a text file to the other business through the secure websiite(to which we have UserId and password). We are doing it manually, is there any way to automate the entire task to send the text file with out any user interaction.

Thanks,
Sam.

Sending Txt To Remote Comp
I am trying to create a program that will send text from my PC to another, using Winsock or somthing like that, but I havent got a clue how to,I'm new to all this stuff.

Any help would be great,
Thanks

Sending Variables To Remote Server
I am trying to send info from a text field to a .PHP file on my server. How would I go about doing this?

Sending Information To Remote Host???
Hi Im trying to have a program which when run sends a string with the username of the person to an email, comment box or online database which can be accessed remotley. I have the information sitting in a text box now I need to send it, any help would be greatly appreciated, thanks!

Sending A MsgBox To A Remote Computer
Hi, I'm starting off a network chat program

I'm trying to send a msgbox to a remote computer asking if it wants to accept the conection to the chat program
this is the code, there's not much there but hey, gotta start somewhere


Private Sub Form_Load()
Winsock1.RemotePort = 1000
Winsock1.Bind 1000

End Sub
Private Sub cmdCall_Click()
Winsock1.RemoteHost = txtAddress
Winsock1.SendData MsgBox("You are being Called By " & txtName, vbYesNo, "ACCEPT?")
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Winsock1.GetData
End Sub

Sending A File To The Remote Computer
there is a form tag in a web page.
i pass the logon page from my app.

Inet1.RemoteHost = "https://www.abc.com"
Inet2.RemoteHost = "https://www.abc.com"

S = "https://www.abc.com/WPEB/amp/loginldap?j_username=xxx&isyeri_kod=123j_password=111&isyeri_sifre=222"
Inet1.URL = S
Inet1.Execute Inet1.URL, "POST", S

Do
DoEvents
Loop Until LoginOK = True

'everything is ok so now


when i send a file (1.xml) on my harddisk, it doest go to webserver.
here the the form tag in webpage...
<form name= "dosyatransfer" ENCTYPE="multipart/form-data" method=post...
.
.

S = "https://www.abc.com/WPEB/amp/dosyatransfer?dosya='c:1.xml'"
Inet2.URL = S
Inet2.Execute Inet2.URL, "POST", S


how can i send the file to web server?
i use the same tecgnique for sending file like loginto webpage from myapp.


Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim vtData As Variant
Dim strdata As String
Dim Re As Integer

Select Case State
Case icError
MsgBox (Inet1.ResponseCode & ":" & Inet1.ResponseInfo)
Inet1.Cancel
Case icResponseCompleted
strdata = ""
Do
DoEvents
vtData = Inet1.GetChunk(1024, icString)
strdata = strdata & vtData
Loop Until Len(vtData) = 0
Re = FreeFile
Open App.Path & "Return.htm" For Output As #Re
Print #Re, strdata
Close (Re)
LoginOK = True
Call ShellExecute(Me.hwnd, vbNullString, App.Path & "
eturn.htm", _
vbNullString, vbNullString, SW_SHOWNORMAL)

End Select
'cmdRun.Enabled = True

End Sub

Retrieving A Current Web Address And IP Address Of The Website
When using IE or Firefox, I wanna be able to use a string to obtain the current web address you are in and also obtain the site's IP address. Any ideas on how to pull this off? Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved