From: Andy Tang on
Need help! I am trying to use the odbc to connect to a native database
thru the web using code. code

<%@ WebService language="VB" class="NavisionItems" %>

Imports System
Imports System.Web.Services
Imports System.Xml.Serialization

Public Class NavisionItems
<webmethod>Function GetNavisionItems() As System.Data.DataSet
Dim connectionString As String = "DSN=nav40;UID=admin;pwd=admin"
Dim dbConnection As new System.Data.odbc.odbcConnection(connectionString)
Dim queryString As String = "select * from test"
Dim dbCommand As System.Data.odbc.odbcCommand = New

'dbCommand.CommandText = queryString
'dbCommand.Connection = dbConnection

'Dim dataAdapter As System.Data.odbc.odbcDataAdapter = New
'dataAdapter.SelectCommand = dbCommand

Dim dataSet As System.Data.DataSet = New System.Data.DataSet
Return dataSet

End Function
End Class


Pages: 1
Prev: Charge Item
Next: Date not valid