|
1 / 1 / 0 Регистрация: 13.06.2015 Сообщений: 65 |
|
|
1 |
|
|
11.03.2019, 20:59. Показов 4628. Ответов 4
Доброго времени суток. Стоит задача подключить Access с паролем к Delphi с помощью ADO. Как исправить это недоразумение?
Без пароля все работает.
0 |
|
10072 / 5146 / 1286 Регистрация: 05.10.2016 Сообщений: 14,486 |
|
|
12.03.2019, 01:11 |
2 |
|
Как исправить это недоразумение? Может я чего не понял, но «недоразумение» на втором скрине, подключение к MDB через … Добавлено через 6 минут
0 |
|
7359 / 4497 / 292 Регистрация: 12.08.2011 Сообщений: 13,719 |
|
|
12.03.2019, 02:24 |
3 |
|
А при чём тут Акцесс? Вот когда будете Акцесс к чему-либо подключать, вот тогда и пишите.
0 |
|
10072 / 5146 / 1286 Регистрация: 05.10.2016 Сообщений: 14,486 |
|
|
12.03.2019, 05:25 |
4 |
|
Вот когда будете Акцесс к чему-либо подключать, вот тогда и пишите. Сам не сразу понял, ТС подключает БД Access к Delphi.
0 |
|
7359 / 4497 / 292 Регистрация: 12.08.2011 Сообщений: 13,719 |
|
|
12.03.2019, 10:38 |
5 |
|
Не подключит он его, Дэльфи — это не БД
0 |
|
1 / 1 / 0 Регистрация: 13.06.2015 Сообщений: 65 |
|
|
1 |
|
|
11.03.2019, 20:59. Показов 4280. Ответов 4
Доброго времени суток. Стоит задача подключить Access с паролем к Delphi с помощью ADO. Как исправить это недоразумение?
Без пароля все работает.
__________________ 0 |
|
9475 / 4802 / 1172 Регистрация: 05.10.2016 Сообщений: 13,472 Записей в блоге: 1 |
|
|
12.03.2019, 01:11 |
2 |
|
Как исправить это недоразумение? Может я чего не понял, но «недоразумение» на втором скрине, подключение к MDB через … Добавлено через 6 минут 0 |
|
7262 / 4465 / 287 Регистрация: 12.08.2011 Сообщений: 13,445 |
|
|
12.03.2019, 02:24 |
3 |
|
А при чём тут Акцесс? Вот когда будете Акцесс к чему-либо подключать, вот тогда и пишите. 0 |
|
9475 / 4802 / 1172 Регистрация: 05.10.2016 Сообщений: 13,472 Записей в блоге: 1 |
|
|
12.03.2019, 05:25 |
4 |
|
Вот когда будете Акцесс к чему-либо подключать, вот тогда и пишите. Сам не сразу понял, ТС подключает БД Access к Delphi. 0 |
|
7262 / 4465 / 287 Регистрация: 12.08.2011 Сообщений: 13,445 |
|
|
12.03.2019, 10:38 |
5 |
|
Не подключит он его, Дэльфи — это не БД 0 |
- Remove From My Forums
-
Question
-
Hi!
I’ve a computer with W2K SP4 installed. Previously SQL Express 2005 worked but according to the user it «just stopped working».
When selecting database on the server in the «Data Link Properties»-window he is given the following error message:
«Microsoft Data Link» «Login failed. Catalog information cannot be retrieved»
followed by
«Microsoft Data Link Error» «Connection failure»Note: He is not given the error message «Server does not exist or access denied!»
— The SQL service is started (can be stopped and restarted without problem)
— I’ve re-installed SQL Express.
— I’ve checked and is certain the server name is correct (i.e. computernameSQLEXPRESS)Any ideas here because I’m getting desperate?
Thanks in advance,
Peter Hartlén
- Remove From My Forums
-
Question
-
Hi!
I’ve a computer with W2K SP4 installed. Previously SQL Express 2005 worked but according to the user it «just stopped working».
When selecting database on the server in the «Data Link Properties»-window he is given the following error message:
«Microsoft Data Link» «Login failed. Catalog information cannot be retrieved»
followed by
«Microsoft Data Link Error» «Connection failure»Note: He is not given the error message «Server does not exist or access denied!»
— The SQL service is started (can be stopped and restarted without problem)
— I’ve re-installed SQL Express.
— I’ve checked and is certain the server name is correct (i.e. computernameSQLEXPRESS)Any ideas here because I’m getting desperate?
Thanks in advance,
Peter Hartlén
|
|
|
|
работа с базой данных по сети
, права доступа
- Подписаться на тему
- Сообщить другу
- Скачать/распечатать тему
|
|
|
|
база — MS Access на сервере, из VB — OdbcConnection1 |
Bas |
|
|
Надо указать путь к с system.mdw , или БД захвачена монопольно. Добавлено 13.05.08, 12:06 |
|
Mishaluk |
|
|
Цитата Bas @ 13.05.08, 12:03
быстрее всего БД захвачена монопольно. ведь проект aspx не препятствует открытию базы программой на Delphi |
Bas |
|
|
Цитата Mishaluk @ 14.05.08, 11:20 быстрее всего БД захвачена монопольно. ведь проект aspx не препятствует открытию базы программой на Delphi Программа на Delphi открывает БД если запущен проект на aspx ? Если да то значит не монопольно. |
|
Mishaluk |
|
|
а что тогда мешает работать проекту на aspx с БД если запущена программа на Delphi (работает с этой же БД) ERROR [IM006] [Microsoft][Диспетчер драйверов ODBC] Ошибка SQLSetConnectAttr драйвера что блокирует программа на Delphi ? ADOConnection.Mode ставлю cmShareDenyNone Добавлено 14.05.08, 12:55 Цитата Bas @ 14.05.08, 12:17 Если да то значит не монопольно. проект на сервере отработал (он выдает только содержание некоторых полей базы и закрылся и проверить мешает ли он работе программе на Delphi как?) aspx страница выдает ADOConnection.Mode ставлю cmShareDenyNone |
Bas |
|
|
Цитата Mishaluk @ 14.05.08, 12:36 ERROR [IM006] Ошибка при выполнении SQLSetConnectionOption. Во время выполнения Менеджер драйверов вызвал ф-цию SQLSetConnectionOption выполнение которой привело к ошибке. Цитата Mishaluk @ 14.05.08, 12:36 cmShareDenyNone cmShareDenyNone — открытие других соединений с разрешениями запрещено. |
|
Mishaluk |
|
|
если запускаешь два вариант программы на delphi одновременно то они работают с этой же базой нормально а aspx страницу не пускает (хотя aspx только читает из базы и ничего в нее не пишет) |
|
Mishaluk |
|
|
соединяюсь из VB через Microsoft.Jet.OLEDB соединение в дельфи строка подключения результат Exception Details: System.Data.OleDb.OleDbException: Невозможно использовать »; файл уже используется. дельфи блокирует БД и aspx не пускает aspx нужно только чтение из этой БД как разрешить эту проблему? |
Bas |
|
|
Цитата Mishaluk @ 16.05.08, 06:31 в дельфи строка подключения Цитата ADO Provider=Microsoft.Jet.OLEDB.4.0; Цитата Mishaluk @ 16.05.08, 06:31 Mode=Share Deny Write означает «запретить всем работу в режиме записи». |
|
Mishaluk |
|
|
да уже поубирал и все равно при запущенном дельфи aspx страница выдапет закроешь дельфи — aspx работает две копии дельфи вместе работают c одной БД |
0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
0 пользователей:
- Предыдущая тема
- Delphi: Базы данных
- Следующая тема
[ Script execution time: 0,0504 ] [ 16 queries used ] [ Generated: 30.01.23, 07:44 GMT ]
Форум программистов Vingrad
|
Опции темы |
| Shift1834 | |||
|
Новичок Профиль Репутация: нет |
Пишу стандартный код, который работал в прошлых проектах:
На строчке ADOConnection1->Open(); появляется исключение: EOLeException with message «Неопознанная ошибка». |
||
| Данкинг | |
Yersinia pestis Профиль
Репутация: нет |
Во-первых, при чём тут раздел по Access? Во-вторых, что содержится в переменной BasePath? ——————— There’s nothing left but silent epitaphs. |
| Shift1834 | |||
|
Новичок Профиль Репутация: нет |
Соединяюсь с Access вот и раздел такой выбрал.
не помогает! |
||
| Данкинг | |||
Yersinia pestis Профиль
Репутация: нет |
Два слэша поставь после пути перед названием базы, и пробелы из названия убери, т.е.:
——————— There’s nothing left but silent epitaphs. |
||
| Shift1834 | |
|
Новичок Профиль Репутация: нет |
1. Пробовал на своей машине (Win7 64 bit без «наворотов») с БД созданной когда-то в Access 2003 — не работает. |
| Shift1834 | |||
|
Новичок Профиль Репутация: нет |
Прочел статью. Скачал и установил драйвер для 64 bit.
Пишет: «Не удается найти указанный поставщик. Вероятно, он установлен неправильно.» |
||
| Shift1834 | |
|
Новичок Профиль Репутация: нет |
Удалил Офис 64 bit поставил 32 bit драйвер Microsoft.ACE.OLEDB.12.0 теперь находится, но не конектится — та же ошибка что и с Microsoft.Jet.OLEDB.4.0 |
| Mach3 | |||
|
Бывалый Профиль Репутация: нет |
Запустил на обоих ноутах, XP32, Win7 64.. ——————— Век живи — век учись… |
||
| Правила форума «C++: Базы данных» | |
| |
Данный форум предназначен для обсуждения вопросов прямым образом связанных с C++ и БД. Так, вопросы только по C++ следует задавать в C++:Общие вопросы а вопросы по абстрактным БД в Базах данных или в соответствующих под-форумах. Благодарим за понимание. Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, chipset. |
| 0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) |
| 0 Пользователей: |
| « Предыдущая тема | C/C++: Базы данных | Следующая тема » |
5 Ways to Fix Microsoft SQL Server Error 233
| Workable Solutions | Step-by-step Troubleshooting |
|---|---|
| Fix 1. Enable TCP/IP |
Open MS SQL Server. Go to configuration tools, and then open «SQL Server Network Configuration»…Full steps |
| Fix 2. Enable Shared Memory |
Shared Memory Protocol is used for connecting SQL Server, if it is disabled, it may lead to SQL Server login failed error 233…Full steps |
| Fix 3. Enable Named Pipes Protocol |
Run MS SQL Server. Go to configuration tools, and then open «SQL Server Network Configuration»…Full steps |
| Fix 4. Check for Remote Connection |
Connect to SQL Server Instance in SSMS on a database server. Right-click on the Server instance…Full steps |
| Fix 5. Repair the MS SQL Database |
Launch EaseUS MS SQL Recovery. Select the corrupted database file. Then, click the «Repair» button…Full steps |
Overview of SQL Server Error 233
SQL Server error 233 was saying «No process is on the other end of the pipe». The error details are given as:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 – No process is on the other end of the pipe) (Microsoft SQL Server, Error: 233)
SQL Server Error Code 233 Causes
No process is on the other end of the pipe error 233 is often caused by two reasons:
- The client attempts to connect with only named pipes and the named pipes protocol is not enabled on the server.
- The client attempts to connect with any available protocol, but named pipes are listed before TCP in the client protocol order.
According to the two reasons above, you can fix error 233 easily.
Fix 1. Enable TCP/IP to Solve SQL Server Error 233
If the client is attempting to connect using named pipes, and the server is not configured to allow remote connections using named pipes, follow this:
Step 1. Open MS SQL Server.
Step 2. Go to configuration tools, and then open «SQL Server Network Configuration» in SQL Server Configuration Manager.
Step 3. Choose «TCP/IP» option and enable remote connections using named pipes.
If the client protocol order is attempting to connect with the named pipes protocol before trying the TCP protocol, and named pipes are not enabled on the server, solve this problem by following this:
Using SQL Server Configuration Manager on the client computer, move TCP before named pipes in the protocol order list.
Fix 2. Enable Shared Memory
Shared Memory Protocol is used for connecting SQL Server, if it is disabled, it may lead to SQL Server login failed error 233.
Step 1. Open MS SQL Server in your system.
Step 2. Choose «Configuration Tools» and «SQL Server Network Configuration».
Step 3. Then, find and right-click «Shared Memory». Choose «Enable».
Fix 3. Enable Named Pipes Protocol to Solve SQL Error 233
SQL Server error 233 occurs because the SQL Server client cannot connect to the server and is not configured to accept remote connections. To fix this issue, except for enabling Shared Memory and TCP/IP, we still need to activate Named Pipe protocols with SQL Server Configuration Manager tool.
Step 1. Run MS SQL Server.
Step 2. Go to configuration tools, and then open «SQL Server Network Configuration» in SQL Server Configuration Manager.
Step 3. Launch the Properties windows of Named Pipes Protocol then click «Enable».
Step 4. Click «Apply» and «OK» to apply this change on SQL Server.
You have required to restart SQL Server services from the SQL Server Configuration Manager. Once the server is online, try to reconnect to your SQL Server instance. Then, the error 233 may not appear and you will be able to make a successful database connection.
Fix 4. Check for Remote Connection
After these workarounds, if you are still facing Microsoft SQL Server error 233 no process is on the other end of the pipe, then you will need to allow remote connection for SQL Server.
Step 1. Connect to SQL Server Instance in SSMS locally on a database server.
Step 2. Right-click on the Server instance name and choose «Properties».
Step 3. At the left tab, select «connection» then check the option «Allow remote connections to this server».
Fix 5. Repair Corrupted MS SQL Database to Resolve SQL Error 233
If you are still facing the same issue, the cause might be the database itself. MS SQL Server is vulnerable to different threats and errors (823/824/825). Repairing the database can do you a favor. EaseUS MS SQL Recovery is a very professional and reliable SQL repair tool. It can recover database components (tables, triggers, indexes, keys, rules, and stored procedures) as well as recover deleted records from the SQL database. It supports MS SQL Server 2016, 2014, 2012, 2008, and older versions. Follow the details below and fix your database error.
Step 1: Select the corrupted database for recovery
- Launch EaseUS MS SQL Recovery.
- Select the corrupted database file by clicking «Browse» (the two dots) or «Search».
- After selecting the file, click the «Repair» button to start the Analyzing process.
Note: To use this software, you need to stop the SQL Server service.
Step 2: Repair the corrupted database
- The software displays all the recoverable items in a tree-like structure. The items are shown in a left pane.
- Select the desired component to be recovered. From the window, click the «Export» button.
Step 3: Export to the database or as scripts
- Choose to export the database objects to database or export the items as scripts
- If you choose «Export to database», enter the information required and choose the target database.
- A window appears up asking you to provide credentials to connect to the server and the destination to save the recovered items. In order to begin the repairing process, click «OK».
Note: Before clicking «OK», you need to restart the SQL Server service.
Though the EaseUS SQL repair tool should succeed in resolving the error, in the rare event that it can’t, you should then contact Microsoft customer support for professional assistance.
Conclusion
In this article, we have discussed SQL Server error 233 no process is on the other end of the pipe in detail, including error explanation, causes, and all the feasible solutions. If you run into this error, don’t panic, utilize any methods above, i.e. enable Shared Memory, TCP/IP, and Named Pipe protocols to let SQL Server client connect to the server or use a reliable SQL recovery software to restore (.mdf and.ndf) files, fix database log files, or recover corrupted objects.
We hope this tutorial can help you to resolve the SQL login failed error 233.
5 Ways to Fix Microsoft SQL Server Error 233
| Workable Solutions | Step-by-step Troubleshooting |
|---|---|
| Fix 1. Enable TCP/IP |
Open MS SQL Server. Go to configuration tools, and then open «SQL Server Network Configuration»…Full steps |
| Fix 2. Enable Shared Memory |
Shared Memory Protocol is used for connecting SQL Server, if it is disabled, it may lead to SQL Server login failed error 233…Full steps |
| Fix 3. Enable Named Pipes Protocol |
Run MS SQL Server. Go to configuration tools, and then open «SQL Server Network Configuration»…Full steps |
| Fix 4. Check for Remote Connection |
Connect to SQL Server Instance in SSMS on a database server. Right-click on the Server instance…Full steps |
| Fix 5. Repair the MS SQL Database |
Launch EaseUS MS SQL Recovery. Select the corrupted database file. Then, click the «Repair» button…Full steps |
Overview of SQL Server Error 233
SQL Server error 233 was saying «No process is on the other end of the pipe». The error details are given as:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 – No process is on the other end of the pipe) (Microsoft SQL Server, Error: 233)
SQL Server Error Code 233 Causes
No process is on the other end of the pipe error 233 is often caused by two reasons:
- The client attempts to connect with only named pipes and the named pipes protocol is not enabled on the server.
- The client attempts to connect with any available protocol, but named pipes are listed before TCP in the client protocol order.
According to the two reasons above, you can fix error 233 easily.
Fix 1. Enable TCP/IP to Solve SQL Server Error 233
If the client is attempting to connect using named pipes, and the server is not configured to allow remote connections using named pipes, follow this:
Step 1. Open MS SQL Server.
Step 2. Go to configuration tools, and then open «SQL Server Network Configuration» in SQL Server Configuration Manager.
Step 3. Choose «TCP/IP» option and enable remote connections using named pipes.
If the client protocol order is attempting to connect with the named pipes protocol before trying the TCP protocol, and named pipes are not enabled on the server, solve this problem by following this:
Using SQL Server Configuration Manager on the client computer, move TCP before named pipes in the protocol order list.
Fix 2. Enable Shared Memory
Shared Memory Protocol is used for connecting SQL Server, if it is disabled, it may lead to SQL Server login failed error 233.
Step 1. Open MS SQL Server in your system.
Step 2. Choose «Configuration Tools» and «SQL Server Network Configuration».
Step 3. Then, find and right-click «Shared Memory». Choose «Enable».
Fix 3. Enable Named Pipes Protocol to Solve SQL Error 233
SQL Server error 233 occurs because the SQL Server client cannot connect to the server and is not configured to accept remote connections. To fix this issue, except for enabling Shared Memory and TCP/IP, we still need to activate Named Pipe protocols with SQL Server Configuration Manager tool.
Step 1. Run MS SQL Server.
Step 2. Go to configuration tools, and then open «SQL Server Network Configuration» in SQL Server Configuration Manager.
Step 3. Launch the Properties windows of Named Pipes Protocol then click «Enable».
Step 4. Click «Apply» and «OK» to apply this change on SQL Server.
You have required to restart SQL Server services from the SQL Server Configuration Manager. Once the server is online, try to reconnect to your SQL Server instance. Then, the error 233 may not appear and you will be able to make a successful database connection.
Fix 4. Check for Remote Connection
After these workarounds, if you are still facing Microsoft SQL Server error 233 no process is on the other end of the pipe, then you will need to allow remote connection for SQL Server.
Step 1. Connect to SQL Server Instance in SSMS locally on a database server.
Step 2. Right-click on the Server instance name and choose «Properties».
Step 3. At the left tab, select «connection» then check the option «Allow remote connections to this server».
Fix 5. Repair Corrupted MS SQL Database to Resolve SQL Error 233
If you are still facing the same issue, the cause might be the database itself. MS SQL Server is vulnerable to different threats and errors (823/824/825). Repairing the database can do you a favor. EaseUS MS SQL Recovery is a very professional and reliable SQL repair tool. It can recover database components (tables, triggers, indexes, keys, rules, and stored procedures) as well as recover deleted records from the SQL database. It supports MS SQL Server 2016, 2014, 2012, 2008, and older versions. Follow the details below and fix your database error.
Step 1: Select the corrupted database for recovery
- Launch EaseUS MS SQL Recovery.
- Select the corrupted database file by clicking «Browse» (the two dots) or «Search».
- After selecting the file, click the «Repair» button to start the Analyzing process.
Note: To use this software, you need to stop the SQL Server service.
Step 2: Repair the corrupted database
- The software displays all the recoverable items in a tree-like structure. The items are shown in a left pane.
- Select the desired component to be recovered. From the window, click the «Export» button.
Step 3: Export to the database or as scripts
- Choose to export the database objects to database or export the items as scripts
- If you choose «Export to database», enter the information required and choose the target database.
- A window appears up asking you to provide credentials to connect to the server and the destination to save the recovered items. In order to begin the repairing process, click «OK».
Note: Before clicking «OK», you need to restart the SQL Server service.
Though the EaseUS SQL repair tool should succeed in resolving the error, in the rare event that it can’t, you should then contact Microsoft customer support for professional assistance.
Conclusion
In this article, we have discussed SQL Server error 233 no process is on the other end of the pipe in detail, including error explanation, causes, and all the feasible solutions. If you run into this error, don’t panic, utilize any methods above, i.e. enable Shared Memory, TCP/IP, and Named Pipe protocols to let SQL Server client connect to the server or use a reliable SQL recovery software to restore (.mdf and.ndf) files, fix database log files, or recover corrupted objects.
We hope this tutorial can help you to resolve the SQL login failed error 233.
Создание именных каналов
Создание именных каналов. Автор: Стас Пономарёв.В этой статье мы будем разбирать связь двух приложений с помощью именных каналов (named pipes). Рассмотрим типы каналов, а также создадим клиент и сервер.1.Для чего именные каналы нужны:Именные каналы являются средством «общения» программ. Они широко используются в UNIX-подобных системах, однако и в Windows они нашли применение. С помощью именных каналов можно передать любую информацию, так как все каналы работают через файлы. Даже для чтениязаписи данных в канале используется функция WinAPI для работы с файлами – ReadFile() и WriteFile(). Передаваться может переменная любого типа (Integer, Boolean, Tbitmap и так далее). Однако, надо заметить, что для передачи строки, она должна быть ограничена – String[40]; Иначе при чтении канала будет появляться ошибка.2. Пример отправяемой переменной:Далее в статье я буду использовать отправляемую переменную типа TpipeData, этот тип будет такой:
type TpipeData = packed record //Имя можно изменить, а тип packed record оставьте
pEvent:byte;
ClientName: string[40]; //Заметьте, ограниченная строка
Date:TdateTime;
End;
Как я уже сказал, здесь можно передавать любые переменные==========СЕРВЕРНАЯ ЧАСТЬ==========3.Использование потоков (TThread):Как такового события записи в канал нет, поэтому придётся запускать цикл чтения. Как известно, циклы подвешивают программы (а точнее зацикливают). Application.ProcessMessages при работе с функцией ReadFile не поможет, так как ReadFile будет выполнятся до тех пор, пока кто-то что-то не запишет. Поэтому надо использовать потоки (TThread). Хочу заметить, что обращение к визуальным компонентам (формам, кнопкам, лэйблам и так далее) из дополнительных потоков невозможно. Для того, чтобы полученные данные не остались в дополнительном потоке, надо его синхронизироватьс главным. Для этого есть функция TThread.Synchronize(method: TtreadMethod); Параметром этой функции надо передовать Какой-нибудь метод(нами созданный) дополнительного потока, где есть обращение к визуальным компонентам. А теперь напишем код нашего потока:
type
TPipeThread = class(TThread)
private
PipeData:TPipeData; //Вот он – наша приёмная переменная, а точнее буфер.
Protected
procedure Execute; override; //Здесь мы будем создавать канал и читать данные из него
public
procedure ShowData; //Здесь будем передовать данные форме
constructor Create(CreateSuspended: Boolean); reintroduce; overload; //Создание потока
end;
4. Работа сименными каналами:Здесь мы рассмотрим нашу процедуру TpipeThread.Execute; но сначала рассмотрим «настройку» наших каналов. Функция CreateNamedPipe доступна только серверу. Ей должны быть переданы следующие параметры:1. lpName – имя нашего канала, а точнее его директория. Если сервер будет расположен на той-же машине, что и клиент, то первый параметр должен быть такой: ‘.PIPEИмяКанала’, где имя канала – ваше название, только латинскими буквами2. dwOpenMode – работа канала может быть:PIPE_ACCESS_INBOUND – сервер может только читать каналPIPE_ACCESS_OTTBOUND – сервет может только записыватьPIPE_ACCESS_DUPLEX – сервер может и писать и читать3. dwPipeMode – режим канала здесь говорится о синхронностиасинхронности канала, и о том, каким методом будетпроизводится обмен данных в канале. Значения:PIPE_WAIT — синхронный каналPIPE_NOWAIT – асинхронный каналPIPE_READMODE_BYTE – метод чтения — байтыPIPE_READMODE_MESSAGE – метод чтения пакетыPIPE_TYPE_BYTE – тип канала — байтыPIPE_TYPE_MESSAGE — тип канала пакеты.В dwPipeMode надо передавать три параметра, например, в нашем примере: PIPE_WAIT or PIPE_READMODE_MESSAGE or PIPE_TYPE_MESSAGE. А теперь, давайте вспомним наш тип TpipeData – он у нас packed, то есть – пакет. Поэтому наш канал работает с пакетами.4. hMaxInstances – максимальное число одновременных подключений – любое ваше число, однако можно указать PIPE_UNLIMITED_INSTANCES для безконечного числа клиентов.5. nOutBufferSize – разбер буфера чтения. Можно найти так – SizeOf(TpipeData) Это как раз тип нашего буфера.6. nInBufferSize – размер буфера записи. Обычно такой же как и буфер чтения.7. nDefaultTimeOut – максимальное время чтения (в милисекундах)8. lpSecurityArtributes – просто пишем nil.Также нам понядобятся фцнкции ConnectNamedPipe, ReadFile и DisconnectNamedPipe, но их параметры мы рассмотрим в процессе написания кода. И так, а теперь наша процедура:
procedure TPipeThread.Execute;
var
hPipe: THandle; //Указатель на наш канал
bytesRead: DWORD; //Количество прочитанных байт
begin
try
hPipe := CreateNamedPipe(‘.PIPEOurPipe’, //Наше имя
PIPE_ACCESS_INBOUND, // сервер может только читать канал
PIPE_WAIT or // Синхронная работа
PIPE_READMODE_MESSAGE or // метод чтения — пакеты
PIPE_TYPE_MESSAGE,
PIPE_UNLIMITED_INSTANCES, // Бесконечно много клиентов
SizeOf(Tpipedata), //размер буфера чтения
SizeOf(Tpipedata), // размер буфера записи
100, // Тайм-аут
nil); // Артребуты безопасности.
if hPipe = INVALID_HANDLE_VALUE then Exit; //Если не удалось создать канал, то выходим
while true do //Теперь читаем, пока не надоест!
begin
try
ConnectNamedPipe(hPipe, nil); //Подключаемся к каналу, второй параметр
//нужен только, если вместо PIPE_WAIT вы указали PIPE_NOWAIT
//Теперь читаем, параметры – указатель на канал, наш буфер,
//кол-во прочитанных байт, и последнее опять таки только для PIPE_NOWAIT.
if ReadFile(hPipe, PipeData, SizeOf(TpipeData), bytesRead, nil) then
begin
Synchronize(ShowData); //Синхронизируемся с главным потоком
end;
finally
DisconnectNamedPipe(hPipe); //Закрываем канал, параметры – только указатель
end;
end;
finally
end;
end;
Ну вот, это большая часть нашего сервера. Функцию ShowData можно сделать такую:
procedure TPipeThread.ShowData;
begin
Case PipeData.pEvent of
1:form1.Memo1.Lines.Add(‘======Событие 1======’);
2:form1.Memo1.Lines.Add(‘=========Событие 2==========’);
end;
form1.Memo1.Lines.Add(‘Программа ‘+PipeData.Clientname+‘ открыла канал’);
form1.Memo1.Lines.Add(DateTostr(PipeData.Date));
form1.Memo1.Lines.Add(»);
end;
==========КЛИЕНТ==========Теперь пришло время написать наш клиент. Так как нам нужо только подключиться и выкинуть данные серверу, а затем сразу отключиться, то весь код клиета можно поместить в одну процедуру:
procedure SendToServer; // Замечу, что должна быть переменная такого же
//типа TpipeData, как и у сервера. Допустим, это Data
var
hPipe: THandle;
bytesWritten: DWORD;
begin
hPipe := CreateFile(‘.PIPEOurPipe’, //Как видите, здесь мы подключаемся
//даже не к каналу, а к файлу
GENERIC_WRITE, //Только запись
FILE_SHARE_READ or // Обмениваемся чтеньюзаписью
FILE_SHARE_WRITE,
nil, //Артрибуты безопасности
OPEN_EXISTING, // Канал должен быть создан
0, 0);
if hPipe = INVALID_HANDLE_VALUE then Exit; //Если произошла ошибка, выходим
if WriteFile(hPipe, Data, SizeOf(TpipeData), bytesWritten,
nil) then DisconnectNamedPipe(hpipe); //Если удачно запиали, закрываем канал.
end;
Исходник клиента — так же можно найти в аттаче!Всё. Теперь вы знаете, как передовать кучу переменных своим программам из других!Автор: Стас Пономарёв. Хочу поблагодарить www.sources.ru www.delphimasters.ru а также Alex-Eraser Взято из http://forum.sources.ru
I’m relatively inexperienced at SQL Server, but am trying to troubleshoot some of the (non-SQL Server-related) logic and UI issues in a Delphi app someone else wrote which uses it. Currently trying to get the dev environment functioning.
Here’s the environment:
Dev machine: Virtual machine (VMWare) running Windows XP, using Bridged Networking. Can connect to folders/files on the server machine fine. I have an old version of SQL Server 2005 Express installed on this machine. I can connect to it okay from this same machine, using the SQL Server Management Studio Express, and also via my Delphi components (ADO, can read/write table data to a grid, etc).
«Server» (aka S1): Actually just a Windows XP workstation. I put a bone stock SQL Server 2008 install on it. Since installing I have enabled Protocols for SQLEXPRESS -> Name Pipes, and TCP/IP, using the Configuration Manager, and restarted the SQL Server service. The SQL Server is set to use Windows NT authorization. This is the machine and SQL Server instance I need to connect to from the Dev machine.
I can connect to the S1 SQL Server instance from the same machine using the Management Studio, but I cannot connect to it from the Dev box, Using either the 2005 Management Studio (which I’m not even sure is supposed to be possible given different versions) or the Delphi components string builder (TADOConnection using OLDEDB Provider for SQL Server). When I try the latter, the S1 SQL Server instance does not show up in the drop-down list, and if I manually type in S1SQLEXPRESS, using either Windows NT Integrated Security or a Specified Username and Password, I get the following error:
---------------------------
Microsoft Data Link Error
---------------------------
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
---------------------------
OK
---------------------------
This is a peer-to-peer network; no domain controller, etc. Username and passwords on the two machines are identical.
How do I go about troubleshooting this?
================================================
Using Andomar’s pointer and the link I commented with below (which explains the Surface Area Configuration tool went away in SQL Server 2008), I’ve gotten to this in the S1 machine’s SQL Server Management Studio settings, and set it as follows, but still no non-local connection ability. What am I missing?
SAC settings http://img192.imageshack.us/img192/8784/sacsettings.jpg
SAC Settings close up http://img38.imageshack.us/img38/457/sacsettings2.jpg
I’m relatively inexperienced at SQL Server, but am trying to troubleshoot some of the (non-SQL Server-related) logic and UI issues in a Delphi app someone else wrote which uses it. Currently trying to get the dev environment functioning.
Here’s the environment:
Dev machine: Virtual machine (VMWare) running Windows XP, using Bridged Networking. Can connect to folders/files on the server machine fine. I have an old version of SQL Server 2005 Express installed on this machine. I can connect to it okay from this same machine, using the SQL Server Management Studio Express, and also via my Delphi components (ADO, can read/write table data to a grid, etc).
«Server» (aka S1): Actually just a Windows XP workstation. I put a bone stock SQL Server 2008 install on it. Since installing I have enabled Protocols for SQLEXPRESS -> Name Pipes, and TCP/IP, using the Configuration Manager, and restarted the SQL Server service. The SQL Server is set to use Windows NT authorization. This is the machine and SQL Server instance I need to connect to from the Dev machine.
I can connect to the S1 SQL Server instance from the same machine using the Management Studio, but I cannot connect to it from the Dev box, Using either the 2005 Management Studio (which I’m not even sure is supposed to be possible given different versions) or the Delphi components string builder (TADOConnection using OLDEDB Provider for SQL Server). When I try the latter, the S1 SQL Server instance does not show up in the drop-down list, and if I manually type in S1\SQLEXPRESS, using either Windows NT Integrated Security or a Specified Username and Password, I get the following error:
---------------------------
Microsoft Data Link Error
---------------------------
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
---------------------------
OK
---------------------------
This is a peer-to-peer network; no domain controller, etc. Username and passwords on the two machines are identical.
How do I go about troubleshooting this?
================================================
Using Andomar’s pointer and the link I commented with below (which explains the Surface Area Configuration tool went away in SQL Server 2008), I’ve gotten to this in the S1 machine’s SQL Server Management Studio settings, and set it as follows, but still no non-local connection ability. What am I missing?
SAC settings http://img192.imageshack.us/img192/8784/sacsettings.jpg
SAC Settings close up http://img38.imageshack.us/img38/457/sacsettings2.jpg
Skip to content
This is a Windows 7 error, this update can fix the problem. But we can solve the problem without requiring the update using the code below.
SSL2 must be disabled. SSL3,TLS1,TLS11,TLS12 can be used.
SOLUTION:
uses
REST.Types, REST.Client, REST.Authenticator.Basic, Data.Bind.Components,
Data.Bind.ObjectScope, NetEncoding, System.Net.HttpClient;
begin
RESTClient1 := TRESTClient.Create('https://test.com/api');
try
RESTClient1.SecureProtocols := [THTTPSecureProtocol.SSL3,THTTPSecureProtocol.TLS1,THTTPSecureProtocol.TLS11,THTTPSecureProtocol.TLS12];
HTTPBasicAuthenticator1 := THTTPBasicAuthenticator.Create('apikey',MyApiKey);
try
RESTRequest1 := TRESTRequest.Create(nil);
try
RESTRequest1.Method := TRESTRequestMethod.rmPOST;
RESTClient1.Authenticator:=HTTPBasicAuthenticator1;
RESTRequest1.Client := RESTClient1;
RESTRequest1.ClearBody;
RESTRequest1.AddBody('{"input1": ["abc"], "input2":"xyz"}',TRestContentType.ctAPPLICATION_JSON);
RESTRequest1.Execute;
MyResult := RESTRequest1.Response.Content;
finally
RESTRequest1.Free;
end;
finally
HTTPBasicAuthenticator1.Free;
end;
finally
RESTClient1.Free;
end;
end;
I am failing to connect to SQL Azure using Delphi 2010 and dbGo. What is wrong and how to resolve that ?
The details:
The TADOConnection with the following connection string (the login info is changed):
Provider=SQLNCLI10.1;Integrated Security="";Persist Security Info=False;User ID=me@tyasdgerj5;Initial Catalog=Northwind;Data Source=tcp:tyasdgerj5.database.windows.net;Initial File Name="";Server SPN=""
Returns the following error text:
Server name cannot be determined. It must appear as the first segment of the server’s dns name (servername.database.windows.net). Some libraries do not send the server name, in which case the server name must be included as part of the user name (username@servername). In addition, if both formats are used, the server names must match..
Note, that SQL Server Management Studio connects without problems.




)

)





















