473,405 Members | 2,171 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Q: ODBC connection

Hello,

Here is my function:

Private Sub myLiveConn()

Dim strConn As String = "Driver={Microsoft Visual FoxPro
Driver};UID=;SourceType=DBF;SourceDB=F:\Report
Data\appt.dbf;Null=No;Deleted=Yes;Exclusive=No;Con nect Timeout=10"

Dim Conn As OdbcConnection = New OdbcConnection(strConn)
Conn.Open()

Dim Da As New OdbcDataAdapter
Dim Ds As New DataSet
Dim cmdSelect As New OdbcCommand

cmdSelect = Conn.CreateCommand
cmdSelect.CommandText = "SELECT * FROM pat"

Da.SelectCommand = cmdSelect
Da.Fill(Ds, "pat")

End Sub

I get an error at conn.open() line: ERROR [IM001] [Microsoft][ODBC Driver
Manager] Driver does not support this function
What is problem?
Thanks,
Jim.

Nov 19 '05 #1
2 1517
Try Using:-
OLE DB, OleDbConnection (.NET)

Database container (.DBC):
----------------------------------
"Provider=vfpoledb.1;Data Source=C:\MyDbFolder\MyDbContainer.dbc;Collating
Sequence=machine"

Free table directory:
---------------------------
"Provider=vfpoledb.1;Data Source=C:\MyDataDirectory\;Collating
Sequence=general"

Force the provider to use an ODBC DSN:
------------------------------------------------
""Provider=vfpoledb.1;DSN=MyDSN""

This should help you..
If not POST ur Error..
Enjoy
Patrick




"JIM.H." wrote:
Hello,

Here is my function:

Private Sub myLiveConn()

Dim strConn As String = "Driver={Microsoft Visual FoxPro
Driver};UID=;SourceType=DBF;SourceDB=F:\Report
Data\appt.dbf;Null=No;Deleted=Yes;Exclusive=No;Con nect Timeout=10"

Dim Conn As OdbcConnection = New OdbcConnection(strConn)
Conn.Open()

Dim Da As New OdbcDataAdapter
Dim Ds As New DataSet
Dim cmdSelect As New OdbcCommand

cmdSelect = Conn.CreateCommand
cmdSelect.CommandText = "SELECT * FROM pat"

Da.SelectCommand = cmdSelect
Da.Fill(Ds, "pat")

End Sub

I get an error at conn.open() line: ERROR [IM001] [Microsoft][ODBC Driver
Manager] Driver does not support this function
What is problem?
Thanks,
Jim.

Nov 19 '05 #2
Jim did that connection string WORK for u..
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sean Anderson | last post by:
ODBC under System DSN Setup Access Driver give it the DSN (Data Source Name) MSA Click on Select and point to the myfile.mdb (your database file)
5
by: SerGioGio | last post by:
Hello, I am going nuts. I am trying to connect to my local ORACLE instance using ODBC. It used to work few weeks ago, but it fails now. Connection with: - SQL*plus: connection works! -...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
14
by: jj | last post by:
Is it possible to call a remote php script from within Access? I'm thinking something like: DoCMD... http://www.domain.com/scripts/dataquery.php DoCmd.OpenQuery "update_data", acNormal, acEdit...
5
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network...
1
by: Paul | last post by:
Hello, I am converting an Access database on our network to a sql 2000 backend and keeping access as the front end. The access database has evolved and been a solution to collect data but now...
4
by: Dave | last post by:
Hey guys, I have an ODBC problem that has me stumped. I wrote a VBA script to run in Microsoft Excel that pulls data out of an application using that application's ODBC driver and puts it into...
9
by: mcbill20 | last post by:
Hello all. I just installed Oracle 10g developer tools on a machine running XP Pro and Office XP. Before this I had just the Oracle 9 client installed. I the previous configuration, I was able to...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
2
by: 111mike | last post by:
Hello, Here's my problem. I cannot connect to mysql database using odbc string connections or dns. I keep getting a "cannot connect to mysql server localhost." I'm running windows XP Pro and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.