473,378 Members | 1,507 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,378 software developers and data experts.

General SQL Error -2147221164

Hi all,

I'm getting the above error in Delphi 4 when attempting to connect a
TDatabase component to an MS Access table. I am following the below
instructions:

Database1.DatabaseName:='tryDB';
Database1.DriverName:=MSACCESS;
Database1.LoginPromt:=false;
Database1.Params.Clear;
Database1.Params.Add('DATABASE NAME=D:\Projects\pattern.mdb');
Database1.Connected:=true;
TDBGrid.DataSource:=DataSource1;
DataSource1.DataSet:=Table1;
Table1.DatabaseName:='tryDB';

Table1.Active:=true;

Any help would be appreciated.

TIA,

TJ

Nov 12 '05 #1
2 5701
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Isn't the driver name based on the ODBC drivers in the Control Panel >
ODBC Administration dialog box? If so the driver name is

Microsoft Access Driver (*.mdb)

and not

MSACCESS

Also, and in this I'm refering to an area I have no knowledge of
(Delphi), you appear to have named the database 3 times:

1) Database1.DatabaseName:='tryDB';
2) Database1.Params.Add('DATABASE NAME=D:\Projects\pattern.mdb');
3) Table1.DatabaseName:='tryDB';

Certainly, once is enough?

HTH,

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQA19aYechKqOuFEgEQJ3QgCfTQfIwtWR7heJKe2M2q8rn8 d15bkAoMbe
Y6Ie+pGJugzNEL5CUfCUqa6S
=LR4U
-----END PGP SIGNATURE-----
Timothy Jones wrote:
Hi all,

I'm getting the above error in Delphi 4 when attempting to connect a
TDatabase component to an MS Access table. I am following the below
instructions:

Database1.DatabaseName:='tryDB';
Database1.DriverName:=MSACCESS;
Database1.LoginPromt:=false;
Database1.Params.Clear;
Database1.Params.Add('DATABASE NAME=D:\Projects\pattern.mdb');
Database1.Connected:=true;
TDBGrid.DataSource:=DataSource1;
DataSource1.DataSet:=Table1;
Table1.DatabaseName:='tryDB';

Table1.Active:=true;

Any help would be appreciated.

TIA,

TJ


Nov 12 '05 #2
Thanks for your input. I think I have an answers to your questions.

You are correct about the ODBC driver being in the ODBC Administration
dialog box, however within Delphi there is a native driver called MSACCESS.
This is the driver that the instructions I have refer to.

On your second point about the database name, I believe the only reference
to the database itself is the Database1.Params.Add('DATABASE
NAME=D:\Projects\pattern.mdb'); where the other two are alias names.

Sorry for the confusion in my previous message, but I'm learning as much as
I can as quickly as I can and still having the same problem.

Regards,
MGFoster wrote in message ...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Isn't the driver name based on the ODBC drivers in the Control Panel >
ODBC Administration dialog box? If so the driver name is

Microsoft Access Driver (*.mdb)

and not

MSACCESS

Also, and in this I'm refering to an area I have no knowledge of
(Delphi), you appear to have named the database 3 times:

1) Database1.DatabaseName:='tryDB';
2) Database1.Params.Add('DATABASE NAME=D:\Projects\pattern.mdb');
3) Table1.DatabaseName:='tryDB';

Certainly, once is enough?

HTH,

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

Nov 12 '05 #3

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

Similar topics

1
by: Dharmesh Gandhi | last post by:
DB-Library Error 10007: General SQL Server error: Check messages from the SQL Server. CREATE PROCEDURE . ( @srvr varchar(50),
2
by: stanley j Mroczek | last post by:
Every thing is on one machine, Programs and sql. Sql is up and running(can test with query analyzer). No changes where made! This was working fine. How do you track this error? What network...
2
by: SteveS | last post by:
Hello all. This problem is stumping me.... I run a page called "default.aspx". For some reason when I execute this page, I get the error below. It seems to run through the entire code behind...
7
by: stan | last post by:
I have .net 2003 and SQL 2000 setup on one system. All I have is one computer (no network). I am able to get to the internet that works. I can run SQL Query Analyzer and it works. The program was...
7
by: Felix Kater | last post by:
Hi, when I need to execute a general clean-up procedure (inside of a function) just before the function returns -- how do I do that when there are several returns spread over the whole function?...
3
by: Yong | last post by:
I get a general network error when I try to make asynchronously call ExecuteNonQuery on long sql statements that run in parallel. Here is the background info on what I'm trying to accomplish: I...
0
by: Yong | last post by:
I'm not getting any reply to my previous thread so I'm stating a new one. I get a General Network Error due to my SqlCommand object not having a big enough CommandTimeout to complete very long...
0
by: bazzer | last post by:
hey, i am using visual basic.net 2003 and have an ASP.NET webform application thats accessing a microsoft access 2003 database. i kept getting the following error when i tried to run it: ERROR ...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
0
by: johnkamal | last post by:
Hi, Some times while opening a page, I am getting the following error message, Please help me to rectify the problem. Server Error in '/' Application. General network error. Check your...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.