WinCC V5.1 import data into project

A

Thread Starter

Andrius

Hello,

who knows how connect to external database via ODBC
in WinCC 5.1 project? How i can link to static odbc32.lib and use emb.sql?
 
M

Mathias Lindgren

Hi!

I think that you cannot use library files in WinCC.

But.

There are three other different ways to connect to an external database.

1. Use ADODB, supported in WinCC C, look at examples at http://www.wincc.net.

2. Use the Win32 plattform by dll calls in WinCC, look at the SDK at microsoft MSDN.

3. Use custom made dll and call it from WinCC.

Example of a dll call (Siemens example, get computer name).

void ComputerName(char* TagName)
{
#pragma code ("Kernel32.DLL");
BOOL GetComputerNameA(LPSTR Computername, LPDWORD size);
#pragma code();
char computer[16];
int size=16;
GetComputerNameA(&computer[0], (LPDWORD)&size);
SetTagChar(TagName, computer);
}

Hope it helped !

Mathias Lindgren Sweden
 
Top