Connecting to MS-SQL-Express with ADO and Delphi 6

Hi,

I have installed MS-SQL Express and created a database - Test1 - and a table within that database called Equipment with a few columns.

I have created a new delphi 6 application with a TADOConnection component. When creating the connection string I have chosen the "Microsoft OLE DB Provider for SQL Server", then entered the server name as
  
"mtpcname\SQLExpress1" and selected Windows NT Integrated security.

Clicking the Test Connection button says that the connection was successful.

However the drop down list to select the database on the server only list master, model msdb and tempdb.  My Test1 database is not present.

Its a few years since Ive done this and can't see what I've done wrong.

Your suggestions welcome.

Thank you.

Mike
0
Michael
2/13/2012 12:35:24 PM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

6 Replies
1587 Views

Similar Articles

[PageSpeed] 14

Is the server located on the same machine where you are trying to create the Delphi client?  

 Regards,
 ~Victor
0
Victor
2/13/2012 1:37:49 PM
> {quote:title=Victor Saveanu wrote:}{quote}
> Is the server located on the same machine where you are trying to create the Delphi client?  
> 

Yes it is, Victor - connection to SQL Server works in that the Test Connection button says OK and I can set the Connected property to TRUE on the ADOConnection component.

Regards,

Mike
0
Michael
2/13/2012 1:41:25 PM
OK, I'm by no means a specialist in MSSQL configuration, but here is what I recall from past experiences with it.

 Your Windows account is what is called a "Login". From there you need to "map" it to a database user in order to get access to it. Start the Management Studio, expand the server node, then "Security" and "Logins". Right click "Logins", then "New". In the new window, "Login name" should be your windows account name (DOMAIN\User if you are under a domain). On the left see "User Mapping", you need to have an entry in that table which "maps" to a database user on your new database.

 Regards,
 ~Victor
0
Victor
2/13/2012 2:20:43 PM
> {quote:title=Victor Saveanu wrote:}{quote}
> OK, I'm by no means a specialist in MSSQL configuration, but here is what I recall from past experiences with it.
> 
>  Your Windows account is what is called a "Login". From there you need to "map" it to a database user in order to get access to it. Start the Management Studio, expand the server node, then "Security" and "Logins". Right click "Logins", then "New". In the new window, "Login name" should be your windows account name (DOMAIN\User if you are under a domain). On the left see "User Mapping", you need to have an entry in that table which "maps" to a database user on your new database.
> 

Thank you.

I remember doing all that in the past - but, I can't see any security node in the tree.  

I have:

 - SQL Server Compact[My Computer\...\test1]
  + Tables
  + Views
  + Programmability
  + Replication

and that's it.

And nothing related to security under any of those nodes.

I wonder if I checked a wrong check box when I was installing the thing.

Thanks,

Mike
0
Michael
2/13/2012 2:49:12 PM
You are connecting at the database level. the tree structure should have 2 nodes above what you see as root, something like:

{code}
- SERVER\instance (SQL Server IP - USERNAME)
 - Databases
  - SQL Server Compact[My Computer\...\test1]
   + Tables
   + Views
   + Programmability
   + Replication
{code}

 I'm not sure what "Compact" means, that part is different than mine. In object explorer, in its toolbar, you have a "Connect" drop down. Use it and select "Database engine". Could possibly load the whole thing.

 Regards,
 ~Victor
0
Victor
2/13/2012 3:20:44 PM
Got it!

Thank you, Victor ... that last step you suggested revealed all the other nodes in the tree.

Thank you for your help!

Kind regards,

Mike
0
Michael
2/13/2012 3:42:17 PM
Reply:

Similar Artilces:

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

[Delphi 2010] ADO - MS SQL Server 2000 - Tranasction
Hello! For the first time I try to use Transaction when connecting via ADO to an MS SQL 2000 Server. I open the Connection, I open the ADOTable, I start the transaction, I insert some records to the ADOTable, I committ the transaction and ... nothing is saved in the SQL Server. Any hints what I'm missing? Thanks in advance and regards, Klaus "Klaus Edelmann" <fritzfranz24@hotmail.com> ha scritto nel messaggio news:246769@forums.embarcadero.com... > Hello! > > For the first time I try to use Transaction when connecting via ADO to an > ...

Delphi, ADO, SQL Anywhere
This combination seem not to work together. I'm using D5 Enterprise, ASA 6.03 w/latest EBF On some tables it works. But most of the tables produce a message "An Error occured". As soon as data bound contols are used, the connection just gives errors. It seem to work fine, if I use client based cursors. But this option copys the server table to the local client. This is not acceptable for my large tables. It lasts several minutes on my pc. Are there plans to release a native OLE DB provider for ASA or at least to fix the ODBC driver so, that ADO can be used? I am very...

ASA7 ADO & Delphi ADO ?? Anyone is using it?
Any comments? Is it working? Any Problems? Thanks Hi, PR <noemail@no.com> schrieb in im Newsbeitrag: BoTThJaq$GA.89@forums.sybase.com... > Any comments? Is it working? Any Problems? I tried to connect to ASA7 via the new OLE DB - Provider and ADOExpress from Delphi 5.01. No chance. Only the error message 'Invalid Enum Value'. About the new provider I haven't heard anything good until now... Regards Frank Frank, I've experienced the same problem with the ASA 7 OLEDB Provider. I'm not sure if this is a bug in the AsaProvider or Delp...

Help with ADO connectivity in Delphi XE
The company I work for has finally started migrating applications from Delphi 5 and 7 to Delphi XE and XE2. But, I am having a problem with a TADOConnection. A simple application built in D5 to connect to a MS SQL database works. But the same code compiled in Delphi XE will not connect. When the user's role changes from User to Power User, they can connect to the database in the app compiled in XE. The workstation that the user is running from is Windows XP. The SQL Server version is 2005. MDAC version 2.8 Unfortunately, we have been unable to simulate their environment, an...

ADO Connection not working if Delphi and Oracle not on same computer
I had Delphi working fine with Oracle using ADO when Oracle 11g is on the same pc as Delphi. I tried to use Delphi from another pc and I do not know what to enter for "Servername" on the Build connection string screen. Originally I had tough I needed to enter the computer name, aka Hostname. I also tried entering a name of the oracle instance or Oracle service, and also tried using this info in for format of hostname.service and \\hostname-service. Can someone help -is it just the computer name, is it the ip address, does it need the Oracle instance name? Thanks. steve Hel...

Has anyone tried Delphi + ADO + SQL Anywhere?
Good morning, Has anyone tried using Delphi 5 with the ADO components hitting SQL Anywhere? What was your experience? TIA -- Mr. John A. Jackson President & CEO LWE Research, Inc. www.lweresearch.com John, I am currently using ADO with C++ Builder 5 enterprise hitting SQL Anywhere Studio 6.0.3 with no problems whatsoever. Neo Mr. John A. Jackson <info@lweresearch.com> wrote in message news:OKnZFeihAHA.87@forums.sybase.com... > Good morning, > > Has anyone tried using Delphi 5 with the ADO components hitting SQL > Anywhere? What was you...

Connection String for ADO Database in delphi prism
Hi, I want to connect to a database with ADO and aspx. from VB code what is the equivalent in delphi prism ? .... Dim MyReader as sqldatareader Dim MyConnection as sqlconnection = new sqlconnection() myConnection.connectionstring = configurationmanager.connectionstrings("DSN_MYDB").connectionstring Dim mycommand as sqlcommand = new sqlcommand() mycommand.commandtext="select * from mytable" mycommand.commandtype = commandtype.text mycommand.connection = myconnection mycommand.connection.open() Myreader=mycommand.executereader(commandbehavior.closeconnec...

A problem about connecting ASA by ADO component of Delphi?
Is there anyone to try to use ADO component of Delphi to connect ASA? I fail to do it. I manipulate database by TDataSource,TADOQuery,TConnection components of Delphi, and set up connection with ASA guide. When running the program, the connection is set up successfully. But a EoleException is thrown once I make a query using TADOQuery. System prompt "unknown error". Who knows what happened? Is it a compatible problem between ASA driver(ASAProv) and ADO component of Delphi? (All are ok when connecting ASA by BDE components). Is there anyone to try this?? ...

from delphi 6 to delphi 2010
Hi. It is possible, with component RX, dxforumlibrary, InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. Thank by comments. excequiel arostica wrote: >Hi. > It is possible, with component RX, dxforumlibrary, >InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. > >Thank by comments. Rx is dead and sources are taken over by jcl/jvcl. I dont know about the rest of the components and i have no experiences with bde over the last 9 years. excequiel arostica wrote: > Hi. > It is possible, with component RX, dxforumlibrary,...

Delphi 5 to Delphi 6 and up
Dear List, Trying to add 7Zip compression support to my delphi application. I am using the ported 7Zip sdk (see their website, they have a link). I am stumped on how to rewrite a single function: function ReverseDecode(var Models: array of SmallInt; ....): ..... where the input is mostly a fixed size array of SmallInt. This code perfectly compiles and functions in Delphi 6 and up, but in Delphi 5 I get the error: There is no overloaded version of 'ReverseDecode' that can be called with these arguments And obviously, the input (fixed) isn't the same as the param de...

Remote Connection to SQl Server Express Via ADO
Dear All,I have TWO PCs, one of them  having SQL Server 2005 Expressi get sure the TCP is enables , Active,  Remote conneciton is enabled via TCP onlyfrom VS2005 (C#) i can  add new sqlconnection contorl and  configure it with any of the installed DBsbut when i got to the Other PC with VS2005 as well, i can't  configure itall i can do is to see the server inthe  server list.. but NO databases are retieved at all in the Select database drop down menu any  solution or suggestion  Do you use window authentication? Maybe there is a problem with ...

Delphi 2010 dbexpress for MS SQL Server Express 2005
Hello, Has someone sucessfully configured a TSQLConnection with MS SQL Server Express 2005 with Delphi 2010? I get the following message: "DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, or of the wrong version". I saw in the readme that the native client is now required: it is installed with SQL Express, and I have updated it I also updated the TSQLConnection as below: LibraryName = dbxmss9.dll instead of the default dbxmss.dll VendorLib = sqlncli.dll instead of the default sqlncli10.dll Those dll are available o...

Web resources about - Connecting to MS-SQL-Express with ADO and Delphi 6 - embarcadero.delphi.ado

Resources last updated: 12/30/2015 10:09:01 AM