Hi Everyone!
I am a beginner at VB. I have been a systems admin for some time and my new employers are forcing my hand into programming. I am currently Trying to write custom software that interfaces with our Advantage Database. I have the data source and connection opening fine. It seems that All of the advantage developer classes are working correctly.
Here is a link for adv advantage classes:
http://devzone.advantagedatabase.com/dz/webhelp/Advantage8.1/Advantage.htm
The problem I have is I want to query advantage... then place that query in a data set.., then display the results in datagridview on a form (just trying to see how the tools work) it seems that everything works without errors except I am getting nothing on my datagridview (stays blank after execution.
Here is my code:
Imports Advantage.Data.Provider
Imports System.Windows.Forms
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim DS As New DataSet
Dim connae As New AdsConnection
connae.ConnectionString = "data source = \\*.*.*.*\alta10\data" & "; " & _
"ServerType = Remote | local; ReadOnly = False; LockMode = Proprietary; Compression = Never; " & _
"Chartype = ANSI"
' "user id = mark; password = mypass; " & _
' conn.ConnectionString = "data source=c:\\advantageDB\datafiles\mark; " & _
'"user id = mark; password = mypass " & _
'"ServerType = Local; ReadOnly = False; LockMode = Proprietary; Compression = Never; " & _
'"Chartype = ANSI"
Try
conn.Open()
Catch ex As Exception
MsgBox(ex.Message)
End Try
MsgBox("Connection ae opened")
Dim comm As New AdsCommand
comm.Connection = conn
comm.CommandType = CommandType.Text
comm.CommandText = "select * FROM AE;"
Dim sda As New AdsDataAdapter(comm)
sda.Fill(DS, "test")
DataGridView1.DataSource = DS
End Sub
Please HELP! :)
thanks
Nick