SqlBase and MSsql

Discussion forum about all things SqlBase.
kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

SqlBase and MSsql

Post by kjellv » 25 Feb 2016, 08:12

hi

Can I have both SqlBase local and MSSql on SqlServer at the same time and will it work?

Is there a part in Sql.ini where I have to enter MSSQL details, and if, where and which?

Thanks

RainerE
Germany
Posts: 2049
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: SqlBase and MSsql

Post by RainerE » 25 Feb 2016, 09:40

Yes, you can have Gupta SQLBase and MS Sql Server
- in parallel installed on on PC/Server
- in parallel connected from TD applications
(Both SQLBase and/or Sql Server can be istalled locally or on a network server)

I would recommend to connect to MS Sql Server using OLEDB. In this case, you do not have to change sql.ini. Simply use a connection string.

Code: Select all

Set SqlDatabase = STRING_Null
Set SqlUser = STRING_Null
Set SqlPassword = STRING_Null
Set SqlResultSet = TRUE
Set SqlIsolationLevel = 'RL'
Set sConnectionString = 'SQLOLEDB;Data Source=yourServer;Initial Catalog=yourDatabase;User ID=yourUser;Password=yourPassword;Persist Security Info=True;'
Call SqlCreateSession( hSession, sConnectionString )
Call SqlSetSessionParameter( hSession, DBP_AUTOCOMMIT, FALSE, '' )
Call SqlCreateStatement( hSession, hSqlServer )
Call SqlPrepareAndExecute( hSqlServer, 'yourStatement' )
...
Call SqlDisconnect( hSqlServer )
Call SqlFreeSession( hSession )
Regards,
Rainer

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: SqlBase and MSsql

Post by kjellv » 25 Feb 2016, 15:24

:D
Rainer wrote:Yes, you can have Gupta SQLBase and MS Sql Server
- in parallel installed on on PC/Server
- in parallel connected from TD applications
(Both SQLBase and/or Sql Server can be istalled locally or on a network server)

I would recommend to connect to MS Sql Server using OLEDB. In this case, you do not have to change sql.ini. Simply use a connection string.

Code: Select all

Set SqlDatabase = STRING_Null
Set SqlUser = STRING_Null
Set SqlPassword = STRING_Null
Set SqlResultSet = TRUE
Set SqlIsolationLevel = 'RL'
Set sConnectionString = 'SQLOLEDB;Data Source=yourServer;Initial Catalog=yourDatabase;User ID=yourUser;Password=yourPassword;Persist Security Info=True;'
Call SqlCreateSession( hSession, sConnectionString )
Call SqlSetSessionParameter( hSession, DBP_AUTOCOMMIT, FALSE, '' )
Call SqlCreateStatement( hSession, hSqlServer )
Call SqlPrepareAndExecute( hSqlServer, 'yourStatement' )
...
Call SqlDisconnect( hSqlServer )
Call SqlFreeSession( hSession )
Regards,
Rainer

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: SqlBase and MSsql

Post by kjellv » 26 Feb 2016, 13:06

hi Rainer

Can I ask you also?

How and what I have to do to access MSSQL through SqlTalk?

Thanks

FRBhote
India
Posts: 2176
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: SqlBase and MSsql

Post by FRBhote » 27 Feb 2016, 06:25

We use the sql.ini with this:


[win32client]
clientname=xxx
setzerolengthstringstonull=on


[odbcrtr]
remotedbname=DatabaseName,DSN=DatabaseName
longbuffer=20000
autocommit=off
odbctrace=off
odbctracefile=
enablemultipleconnections=off
fetchrow=255

substitute=@left,left
substitute=@LEFT,LEFT
substitute=@MID,SUBSTRING
substitute=@mid,MID
substitute=@MID,MID
substitute=@mod,MOD
substitute=@MOD,MOD
substitute=@nullvalue,ISNULL
substitute=@NULLVALUE,ISNULL
substitute=@right,RIGHT
substitute=@RIGHT,RIGHT
substitute=@SUBSTRING,MID
substitute=@substring,MID
substitute=@ROUND,ROUND
substitute=||,+
substitute=@TRIM,TRIM
substitute=@ABS,ABS
substitute=@LENGTH,LEN
substitute=@SCAN,INSTR
substitute=SYSTABLES,MsysObjects
substitute=@VALUE,TO_NUMBER
substitute=@DATEVALUE,TO_DATE
substitute=not null with default,DEFAULT '0' NOT NULL
substitute=NOT NULL WITH DEFAULT,DEFAULT '0' NOT NULL
substitute=pctfree,
substitute=PCTFREE,
substitute=pctfree 10,
substitute=PCTFREE 10,
substitute=DOUBLE PRECISION,NUMBER
substitute=SET SPOOL,SPOOL
substitute=@DATE, DateSerial
substitute=SYSDATE, GETDATE()
substitute=sysadm.,
substitute=SYSADM.,
substitute=!=,<>

RainerE
Germany
Posts: 2049
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: SqlBase and MSsql

Post by RainerE » 29 Feb 2016, 09:29

kjellvang wrote:How and what I have to do to access MSSQL through SqlTalk?Thanks
I've never done this. I use MS Sql Server Management Studio instead.

Regards,
Rainer

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: SqlBase and MSsql

Post by kjellv » 03 May 2016, 07:33

hi again

I want to download MS SQL on my PC to try develop applications on this platform. Can you suggest which version I should go for and if possible send me a link to where I can find the best download site?

Thanks

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: SqlBase and MSsql

Post by kjellv » 08 May 2016, 08:47

hi

MS Sql Server is now up and running, but can you tell me :

In my MSSM Studio I have now

Database TeamD
and my connect is (LocalDB)\MSSQLLocalDB

can

Remotedbname = (LocalDB)\MSSQLLocalDB

and

DSN = TeamD

what is then clientname = xxx

I run for the time being only a local db





[win32client]
clientname=xxx
setzerolengthstringstonull=on


[odbcrtr]
remotedbname=DatabaseName,DSN=DatabaseName

kjellv
Norway
Posts: 84
Joined: 05 Sep 2018, 07:12
Location: sandefjord/Norway

Re: SqlBase and MSsql

Post by kjellv » 12 May 2016, 14:43

Rainer wrote:Yes, you can have Gupta SQLBase and MS Sql Server
- in parallel installed on on PC/Server
- in parallel connected from TD applications
(Both SQLBase and/or Sql Server can be istalled locally or on a network server)

I would recommend to connect to MS Sql Server using OLEDB. In this case, you do not have to change sql.ini. Simply use a connection string.

Code: Select all

Set SqlDatabase = STRING_Null
Set SqlUser = STRING_Null
Set SqlPassword = STRING_Null
Set SqlResultSet = TRUE
Set SqlIsolationLevel = 'RL'
Set sConnectionString = 'SQLOLEDB;Data Source=yourServer;Initial Catalog=yourDatabase;User ID=yourUser;Password=yourPassword;Persist Security Info=True;'
Call SqlCreateSession( hSession, sConnectionString )
Call SqlSetSessionParameter( hSession, DBP_AUTOCOMMIT, FALSE, '' )
Call SqlCreateStatement( hSession, hSqlServer )
Call SqlPrepareAndExecute( hSqlServer, 'yourStatement' )
...
Call SqlDisconnect( hSqlServer )
Call SqlFreeSession( hSession )
Regards,
Rainer
hi

My connectstring looks like this

"SQLOLEDB;Data Source=(LocalDB)\MSSQLLocalDB;Initial Catalog=HOLLYWD;User ID=dfUserId;Password=dfPassword;Persist Security Info=True;"

and I have coded the rest of your statements

where dfUserId is the user id I use when I log on to MSSM
where dfPassword is the password when I log on to my PC

I get an error window with the only info dfUserId

Can you help me on?

Kjell

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests