Showing posts with label odbc. Show all posts
Showing posts with label odbc. Show all posts

Sunday, March 25, 2012

Access Database

When i set up an odbc connection to a access database on a network path. I
get an error saying the path is invalid. I am running SP2 . I can use the
same odbc datasource to connect using excel on the report server but not
using any reports.When you are running the report in production remember the path is relative
to the report server, not your workstation. perhaps that is the problem
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Ganesh" <Ganesh@.discussions.microsoft.com> wrote in message
news:8F43DC51-A2AF-46CE-962A-995CDD504BF8@.microsoft.com...
> When i set up an odbc connection to a access database on a network path. I
> get an error saying the path is invalid. I am running SP2 . I can use the
> same odbc datasource to connect using excel on the report server but not
> using any reports.|||i use the unc path to the shared folder on the network. It works fine from
the designer.
"Wayne Snyder" wrote:
> When you are running the report in production remember the path is relative
> to the report server, not your workstation. perhaps that is the problem
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Ganesh" <Ganesh@.discussions.microsoft.com> wrote in message
> news:8F43DC51-A2AF-46CE-962A-995CDD504BF8@.microsoft.com...
> > When i set up an odbc connection to a access database on a network path. I
> > get an error saying the path is invalid. I am running SP2 . I can use the
> > same odbc datasource to connect using excel on the report server but not
> > using any reports.
>
>|||Yes, but does the account the report is running under have rights to that
unc path?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Ganesh" <Ganesh@.discussions.microsoft.com> wrote in message
news:1FD8B93F-0179-4892-A787-11E3C904CB1A@.microsoft.com...
>i use the unc path to the shared folder on the network. It works fine from
> the designer.
> "Wayne Snyder" wrote:
>> When you are running the report in production remember the path is
>> relative
>> to the report server, not your workstation. perhaps that is the problem
>> --
>> Wayne Snyder, MCDBA, SQL Server MVP
>> Mariner, Charlotte, NC
>> www.mariner-usa.com
>> (Please respond only to the newsgroups.)
>> I support the Professional Association of SQL Server (PASS) and it's
>> community of SQL Server professionals.
>> www.sqlpass.org
>> "Ganesh" <Ganesh@.discussions.microsoft.com> wrote in message
>> news:8F43DC51-A2AF-46CE-962A-995CDD504BF8@.microsoft.com...
>> > When i set up an odbc connection to a access database on a network
>> > path. I
>> > get an error saying the path is invalid. I am running SP2 . I can use
>> > the
>> > same odbc datasource to connect using excel on the report server but
>> > not
>> > using any reports.
>>|||I have a similar problem, which is almost certainly a permissions problem in
the target shared directory. When you say "Account the report is running
under" are you talking about stored credentials in the RDS (which do not seem
to work) or a SYSTEM account that RS is using to try to access this shared
dir. I have had no luck whatsoever so any assistance tyou could render would
be most appreciated.
Thanks
Mark
"Bruce L-C [MVP]" wrote:
> Yes, but does the account the report is running under have rights to that
> unc path?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Ganesh" <Ganesh@.discussions.microsoft.com> wrote in message
> news:1FD8B93F-0179-4892-A787-11E3C904CB1A@.microsoft.com...
> >i use the unc path to the shared folder on the network. It works fine from
> > the designer.
> >
> > "Wayne Snyder" wrote:
> >
> >> When you are running the report in production remember the path is
> >> relative
> >> to the report server, not your workstation. perhaps that is the problem
> >>
> >> --
> >> Wayne Snyder, MCDBA, SQL Server MVP
> >> Mariner, Charlotte, NC
> >> www.mariner-usa.com
> >> (Please respond only to the newsgroups.)
> >>
> >> I support the Professional Association of SQL Server (PASS) and it's
> >> community of SQL Server professionals.
> >> www.sqlpass.org
> >>
> >> "Ganesh" <Ganesh@.discussions.microsoft.com> wrote in message
> >> news:8F43DC51-A2AF-46CE-962A-995CDD504BF8@.microsoft.com...
> >> > When i set up an odbc connection to a access database on a network
> >> > path. I
> >> > get an error saying the path is invalid. I am running SP2 . I can use
> >> > the
> >> > same odbc datasource to connect using excel on the report server but
> >> > not
> >> > using any reports.
> >>
> >>
> >>
>
>sql

Thursday, March 22, 2012

Access and MSDE

how to i can connect the access database and the msde server?
i try whit the "odbc databases" function of access 2000 but not work
sql state 01000
errore di sqlserver
10060 impossibile effettuare la connessione
sql state 08001
errore di sqlserver 17
sorry for my english... ;(
IgnazioC
hi Ignazio,
IgnazioC wrote:
> how to i can connect the access database and the msde server?
> i try whit the "odbc databases" function of access 2000 but not work
> sql state 01000
> errore di sqlserver
> 10060 impossibile effettuare la connessione
> sql state 08001
> errore di sqlserver 17
10060 is a timeout problem. Make sure that you don't have firewall issues
between the client and server. Even personal firewalls on the Server will
block this traffic by default.
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||before it worked,but to the unexpected one it did not work more.
I have changed the name of the pc and all now it works.
why happens this? my name of the pc are "locked" on msde sever? as I
can unlock it?
|||hi Ignazio,
IgnazioC wrote:
> before it worked,but to the unexpected one it did not work more.
> I have changed the name of the pc and all now it works.
> why happens this? my name of the pc are "locked" on msde sever? as I
> can unlock it?
as regard MSDE by it self, there's no problem at all... this was a problem
with SQL Server 7.0/MSDE 1.0 but it is no longer the case...
you can have now problems regarding ie: the registration on Enterprise
Manager, and, re-registering servers on Enterprise Manager UI will solve EM
problems..
or, of course, net problems due to not resolved computer names for firewall
as well...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
sql

Monday, March 19, 2012

Access 2000 forms record count wont show

I have a SQL Server 2000 backend with an Access 2000 .mdb frontend using ODBC to connect to the SQL tables.

I have forms with their Recordsource set to the SQL tables but when I open the forms, the total record count isn't shown beside the record navigator unless I click to go to the end of the recordset. I really need the record count to show up.

HELP!This question really belongs in the Acces forum, but try creating an On Open event in your form with this code:

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acLast
DoCmd.GoToRecord , , acFirst
End Sub

blindman

Access 2000 FAILS to relink ODBC tables with correct credentials

i have an access 2000 db in which i dynamically relink the tables from
sqlserver 2000 depending on the user - some users having read only
permissions, others read/write etc.
however access 2000 DOES NOT relink correctly and after looking in
msysobjects in access, have found that it seems to cache the last login
name. needless to say this ruins any permissions i have set on
sqlserver.
an edit of the code is attached below:
step 1. delete attached tables - this works and clears out msysobjects
step 2. get tablenames from sql server as recordset - this works as
well.
step 3. reattach
ODBC_STR = "ODBC;DSN=BMTL;DATABASE=BMTL;UID=" & Usr & ";PWD=;"
Set dbsODBC = OpenDatabase("", False, False, ODBC_STR)
'rs(0) = tablename
Do While Not rs.EOF
Set td = CurrentDb.CreateTableDef(rs(0), dbAttachSavePWD)
td.Connect = dbsODBC.Connect
td.SourceTableName = dbsODBC.TableDefs("dbo." & rs(0)).Name
CurrentDb.TableDefs.Append td
CurrentDb.TableDefs.Refresh 'refresh link here hopefully
rs.MoveNext
Loop
'refresh just to be sure
CurrentDb.TableDefs.Refresh
'open msysobjects in access and all are linked on either the current
login or on some previously cached login - which it does is random.
is there some attribute or method i can call that will absolutely
refresh the odbc link on the table?
regards
Edwinah63
Probably not the cause of your issue, but, you should not use
currentdb() like that. Instead, you should cache it in a variable & use
the variable:
dim db as database
set db -= currentdb()
db.this ... db.that ... db.t'other
set db = nothing
To understand why, google all groups on "currentdb cache kaplan"
(without the quotes).
HTH,
TC
|||Also, you might want to check out the refreshlink method.
tabledefs.refresh refreshes the tables collection, which is not the
same thing.
HTH,
TC
|||You are using DAO methods on Application.CurrentDB, i.e.
Application.dbengine.workspaces(0).databases(0)
dbEngine caches ODBC connections. Since you do not wish
to use cached connections, you can (1) wait ~ 15 minutes
until the cached connections time out, or (2) Change
the timeout interval, or (3) Flush the connections by
closing the application and re-opening, or
(4) use a separate dbEngine object.
set dbe = createobject("dao.dbengine.36")
with a separate database object:
set db = dbe.opendatabase()
or (5) use ADO to create a separate dbengine object
I wouldn't do it that way anyhow: I'd use Windows security
for the read only users, and use 0 instead of dbAttachSavePWD
for those users.
(david)
"Edwinah63" <edwinah@.customercare.com.au> wrote in message
news:1128573589.087302.168780@.g43g2000cwa.googlegr oups.com...
>i have an access 2000 db in which i dynamically relink the tables from
> sqlserver 2000 depending on the user - some users having read only
> permissions, others read/write etc.
> however access 2000 DOES NOT relink correctly and after looking in
> msysobjects in access, have found that it seems to cache the last login
> name. needless to say this ruins any permissions i have set on
> sqlserver.
> an edit of the code is attached below:
> step 1. delete attached tables - this works and clears out msysobjects
> step 2. get tablenames from sql server as recordset - this works as
> well.
> step 3. reattach
> ODBC_STR = "ODBC;DSN=BMTL;DATABASE=BMTL;UID=" & Usr & ";PWD=;"
> Set dbsODBC = OpenDatabase("", False, False, ODBC_STR)
> 'rs(0) = tablename
> Do While Not rs.EOF
> Set td = CurrentDb.CreateTableDef(rs(0), dbAttachSavePWD)
> td.Connect = dbsODBC.Connect
> td.SourceTableName = dbsODBC.TableDefs("dbo." & rs(0)).Name
> CurrentDb.TableDefs.Append td
> CurrentDb.TableDefs.Refresh 'refresh link here hopefully
> rs.MoveNext
> Loop
> 'refresh just to be sure
> CurrentDb.TableDefs.Refresh
> 'open msysobjects in access and all are linked on either the current
> login or on some previously cached login - which it does is random.
> is there some attribute or method i can call that will absolutely
> refresh the odbc link on the table?
> regards
> Edwinah63
>

Access 2000 FAILS to relink ODBC tables with correct credentials

i have an access 2000 db in which i dynamically relink the tables from
sqlserver 2000 depending on the user - some users having read only
permissions, others read/write etc.
however access 2000 DOES NOT relink correctly and after looking in
msysobjects in access, have found that it seems to cache the last login
name. needless to say this ruins any permissions i have set on
sqlserver.
an edit of the code is attached below:
step 1. delete attached tables - this works and clears out msysobjects
step 2. get tablenames from sql server as recordset - this works as
well.
step 3. reattach
ODBC_STR = "ODBC;DSN=BMTL;DATABASE=BMTL;UID=" & Usr & ";PWD=;"
Set dbsODBC = OpenDatabase("", False, False, ODBC_STR)
'rs(0) = tablename
Do While Not rs.EOF
Set td = CurrentDb.CreateTableDef(rs(0), dbAttachSavePWD)
td.Connect = dbsODBC.Connect
td.SourceTableName = dbsODBC.TableDefs("dbo." & rs(0)).Name
CurrentDb.TableDefs.Append td
CurrentDb.TableDefs.Refresh 'refresh link here hopefully
rs.MoveNext
Loop
'refresh just to be sure
CurrentDb.TableDefs.Refresh
'open msysobjects in access and all are linked on either the current
login or on some previously cached login - which it does is random.
is there some attribute or method i can call that will absolutely
refresh the odbc link on the table?
regards
Edwinah63Probably not the cause of your issue, but, you should not use
currentdb() like that. Instead, you should cache it in a variable & use
the variable:
dim db as database
set db -= currentdb()
db.this ... db.that ... db.t'other
set db = nothing
To understand why, google all groups on "currentdb cache kaplan"
(without the quotes).
HTH,
TC|||Also, you might want to check out the refreshlink method.
tabledefs.refresh refreshes the tables collection, which is not the
same thing.
HTH,
TC|||You are using DAO methods on Application.CurrentDB, i.e.
Application.dbengine.workspaces(0).databases(0)
dbEngine caches ODBC connections. Since you do not wish
to use cached connections, you can (1) wait ~ 15 minutes
until the cached connections time out, or (2) Change
the timeout interval, or (3) Flush the connections by
closing the application and re-opening, or
(4) use a separate dbEngine object.
set dbe = createobject("dao.dbengine.36")
with a separate database object:
set db = dbe.opendatabase()
or (5) use ADO to create a separate dbengine object
I wouldn't do it that way anyhow: I'd use Windows security
for the read only users, and use 0 instead of dbAttachSavePWD
for those users.
(david)
"Edwinah63" <edwinah@.customercare.com.au> wrote in message
news:1128573589.087302.168780@.g43g2000cwa.googlegroups.com...
>i have an access 2000 db in which i dynamically relink the tables from
> sqlserver 2000 depending on the user - some users having read only
> permissions, others read/write etc.
> however access 2000 DOES NOT relink correctly and after looking in
> msysobjects in access, have found that it seems to cache the last login
> name. needless to say this ruins any permissions i have set on
> sqlserver.
> an edit of the code is attached below:
> step 1. delete attached tables - this works and clears out msysobjects
> step 2. get tablenames from sql server as recordset - this works as
> well.
> step 3. reattach
> ODBC_STR = "ODBC;DSN=BMTL;DATABASE=BMTL;UID=" & Usr & ";PWD=;"
> Set dbsODBC = OpenDatabase("", False, False, ODBC_STR)
> 'rs(0) = tablename
> Do While Not rs.EOF
> Set td = CurrentDb.CreateTableDef(rs(0), dbAttachSavePWD)
> td.Connect = dbsODBC.Connect
> td.SourceTableName = dbsODBC.TableDefs("dbo." & rs(0)).Name
> CurrentDb.TableDefs.Append td
> CurrentDb.TableDefs.Refresh 'refresh link here hopefully
> rs.MoveNext
> Loop
> 'refresh just to be sure
> CurrentDb.TableDefs.Refresh
> 'open msysobjects in access and all are linked on either the current
> login or on some previously cached login - which it does is random.
> is there some attribute or method i can call that will absolutely
> refresh the odbc link on the table?
> regards
> Edwinah63
>

Access + ODBC + MS SQL on WAN

Hi, there !
Can anybody tell me why the application MS ACCESS 2002
front-end + MS SQL Server 2000 back-end with the tables
linked via ODBC is running perfectly well on LAN, and does
not run on WAN ?
The firewall and security issues excluded.
Many thanks,
Dmitri KalininWhat do you mean by 'Does not run'
Is it slow? Crashes?
"Dmitri" <kalinin@.dblink.co.nz> wrote in message
news:081301c33f95$46100d80$a101280a@.phx.gbl...
> Hi, there !
> Can anybody tell me why the application MS ACCESS 2002
> front-end + MS SQL Server 2000 back-end with the tables
> linked via ODBC is running perfectly well on LAN, and does
> not run on WAN ?
> The firewall and security issues excluded.
> Many thanks,
> Dmitri Kalinin|||"Dmitri" <kalinin@.dblink.co.nz> wrote in message news:<081301c33f95$46100d80$a101280a@.phx.gbl>...
> Hi, there !
> Can anybody tell me why the application MS ACCESS 2002
> front-end + MS SQL Server 2000 back-end with the tables
> linked via ODBC is running perfectly well on LAN, and does
> not run on WAN ?
> The firewall and security issues excluded.
> Many thanks,
> Dmitri Kalinin
I'd guess there are different network protocols involved somehow.
Or maybe DNS.
Perhaps you need a LMhosts file (update)?

Access .mdb link to SQL Server 2000

Hi,
Can anyone help - I've got an Access 2002 Database which links to our SQL Se
rver 2000 Database via an ODBC connection. The connection is set to use SQL
Server authentication which works fine for myself but not for a domain user
who needs this.
When I launch the Database and run the query which links the Database I get
"Connection failed: Sqlstate: 28000 Sql server error: 18456 Microsoft odbc
sql server driver sql server login failed for user null; reason, not associa
ted with a trusted sql server.
I've installed the latest version of MDAC 2.8 which didn't help. When I get
the error message up, I can get round the problem by unticking the "Use Tru
sted Connection" and then inputting the SQL Server password for the user but
it should just run the query and display in Access.
Any advice would be great.
Thanks,
MichaelYou'll need to create a security group for the users that require access to
SQL Server. Give that security group necessary permissions to the database a
nd your trusted connection should work.
Adding the security group is somewhat documented here: http://support.microsoft.co
..Ben-us%3B889615
Steve
"Hoja, Michael" <Michho@.oink.co.uk> wrote in message news:uxRarDDFFHA.1260@.T
K2MSFTNGP12.phx.gbl...
Hi,
Can anyone help - I've got an Access 2002 Database which links to our SQL Se
rver 2000 Database via an ODBC connection. The connection is set to use SQL
Server authentication which works fine for myself but not for a domain user
who needs this.
When I launch the Database and run the query which links the Database I get
"Connection failed: Sqlstate: 28000 Sql server error: 18456 Microsoft odbc
sql server driver sql server login failed for user null; reason, not associa
ted with a trusted sql server.
I've installed the latest version of MDAC 2.8 which didn't help. When I get
the error message up, I can get round the problem by unticking the "Use Tru
sted Connection" and then inputting the SQL Server password for the user but
it should just run the query and display in Access.
Any advice would be great.
Thanks,
Michael|||Thanks Steve - I'll give that a go and let you know how I get on.
"Steve Thompson" <stevethompson@.nomail.please> wrote in message news:OH$IIvO
GFHA.936@.TK2MSFTNGP12.phx.gbl...
You'll need to create a security group for the users that require access to
SQL Server. Give that security group necessary permissions to the database a
nd your trusted connection should work.
Adding the security group is somewhat documented here: http://support.microsoft.co
..Ben-us%3B889615
Steve
"Hoja, Michael" <Michho@.oink.co.uk> wrote in message news:uxRarDDFFHA.1260@.T
K2MSFTNGP12.phx.gbl...
Hi,
Can anyone help - I've got an Access 2002 Database which links to our SQL Se
rver 2000 Database via an ODBC connection. The connection is set to use SQL
Server authentication which works fine for myself but not for a domain user
who needs this.
When I launch the Database and run the query which links the Database I get
"Connection failed: Sqlstate: 28000 Sql server error: 18456 Microsoft odbc
sql server driver sql server login failed for user null; reason, not associa
ted with a trusted sql server.
I've installed the latest version of MDAC 2.8 which didn't help. When I get
the error message up, I can get round the problem by unticking the "Use Tru
sted Connection" and then inputting the SQL Server password for the user but
it should just run the query and display in Access.
Any advice would be great.
Thanks,
Michael

Access .mdb link to SQL Server 2000

Hi,
Can anyone help - I've got an Access 2002 Database which links to our SQL Server 2000 Database via an ODBC connection. The connection is set to use SQL Server authentication which works fine for myself but not for a domain user who needs this.
When I launch the Database and run the query which links the Database I get "Connection failed: Sqlstate: 28000 Sql server error: 18456 Microsoft odbc sql server driver sql server login failed for user null; reason, not associated with a trusted sql server.
I've installed the latest version of MDAC 2.8 which didn't help. When I get the error message up, I can get round the problem by unticking the "Use Trusted Connection" and then inputting the SQL Server password for the user but it should just run the query and display in Access.
Any advice would be great.
Thanks,
Michael
You'll need to create a security group for the users that require access to SQL Server. Give that security group necessary permissions to the database and your trusted connection should work.
Adding the security group is somewhat documented here: http://support.microsoft.com/default...en-us%3B889615
Steve
"Hoja, Michael" <Michho@.oink.co.uk> wrote in message news:uxRarDDFFHA.1260@.TK2MSFTNGP12.phx.gbl...
Hi,
Can anyone help - I've got an Access 2002 Database which links to our SQL Server 2000 Database via an ODBC connection. The connection is set to use SQL Server authentication which works fine for myself but not for a domain user who needs this.
When I launch the Database and run the query which links the Database I get "Connection failed: Sqlstate: 28000 Sql server error: 18456 Microsoft odbc sql server driver sql server login failed for user null; reason, not associated with a trusted sql server.
I've installed the latest version of MDAC 2.8 which didn't help. When I get the error message up, I can get round the problem by unticking the "Use Trusted Connection" and then inputting the SQL Server password for the user but it should just run the query and display in Access.
Any advice would be great.
Thanks,
Michael
|||Thanks Steve - I'll give that a go and let you know how I get on.
"Steve Thompson" <stevethompson@.nomail.please> wrote in message news:OH$IIvOGFHA.936@.TK2MSFTNGP12.phx.gbl...
You'll need to create a security group for the users that require access to SQL Server. Give that security group necessary permissions to the database and your trusted connection should work.
Adding the security group is somewhat documented here: http://support.microsoft.com/default...en-us%3B889615
Steve
"Hoja, Michael" <Michho@.oink.co.uk> wrote in message news:uxRarDDFFHA.1260@.TK2MSFTNGP12.phx.gbl...
Hi,
Can anyone help - I've got an Access 2002 Database which links to our SQL Server 2000 Database via an ODBC connection. The connection is set to use SQL Server authentication which works fine for myself but not for a domain user who needs this.
When I launch the Database and run the query which links the Database I get "Connection failed: Sqlstate: 28000 Sql server error: 18456 Microsoft odbc sql server driver sql server login failed for user null; reason, not associated with a trusted sql server.
I've installed the latest version of MDAC 2.8 which didn't help. When I get the error message up, I can get round the problem by unticking the "Use Trusted Connection" and then inputting the SQL Server password for the user but it should just run the query and display in Access.
Any advice would be great.
Thanks,
Michael

Access -> ODBC -> SQL Server connection hangs

I have an MS Access 2003 database that uses a SQL Server 2000 database as
it's back-end. The database runs well most of the time but if the users dont
use the database for a period of time (approx 10 minutes) and return to it
then the connection hangs. When they try to perform any action that requires
a connection to the SQL Server database then the egg-timer mouse pointer
displays and the database stops responding. It's as if the connection times
out when it becomes inactive for a period of time. Due to a shortage of time
and the impatience of the operators I haven't seen the error message yet
(assuming one eventually appears). The problem is "fixed" by closing the
database and re-opening it again.
If the operators keep using the database constantly then the connection
seems to stay open and the database operates reliably.
I use an ODBC connection using SQL Server authentication. I don't use
Windows NT authentication because I was getting "Cannot generate SSPI
context" errors when I tried to use it (could this be related to the other
problem?).
Any ideas what is wrong and how I can fix it?
Access 2003/Jet 4.0 has an ODBC setting called ConnectionTimeout which is
"The number of seconds a cached connection can remain idle before timing
out. The default is 600 (values are of type REG_DWORD)." 600 seconds is 10
minutes.
This property is found at
\HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Eng ines\ODBC
On the client where Access is installed, set this to a higher value or 0
for indefinite.
-- james
***Disclaimer: This posting is provided "as is" with no warranties and
confers no rights.***
--
>From: "Davey" <davey@.hello.com>
>Newsgroups:
comp.databases.ms-access,microsoft.public.sqlserver.connect,microsof t.public
.sqlserver.odbc,microsoft.public.sqlserver.server
>Subject: Access -> ODBC -> SQL Server connection hangs
>Date: Tue, 22 Feb 2005 18:21:15 +0100
>Lines: 22
>Message-ID: <381bg7F5hs90lU1@.individual.net>
>X-Trace: individual.net hlPan2h158ALGlSJ0qH+wApbb7gzleZkv9TQYLUPSiELWze4U=
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
>X-RFC2646: Format=Flowed; Original
>Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!newsfeed00.
sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berl
in.de!individual.net!not-for-mail
>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.odbc:43324
microsoft.public.sqlserver.server:378990
microsoft.public.sqlserver.connect:44465
>X-Tomcat-NG: microsoft.public.sqlserver.connect
>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users
dont
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that
requires
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection
times
>out when it becomes inactive for a period of time. Due to a shortage of
time
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>
>
|||How are you connecting, linked tables via DSN or by supplying
connection string in code? (the latter is recommended). You can also
try sticking a SQL Profiler trace to see what's going on at the
server, and try connecting from user's machines using some other
client besides Access.
--Mary
On Tue, 22 Feb 2005 18:21:15 +0100, "Davey" <davey@.hello.com> wrote:

>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users dont
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that requires
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection times
>out when it becomes inactive for a period of time. Due to a shortage of time
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>

Access -> ODBC -> SQL Server connection hangs

I have an MS Access 2003 database that uses a SQL Server 2000 database as
it's back-end. The database runs well most of the time but if the users dont
use the database for a period of time (approx 10 minutes) and return to it
then the connection hangs. When they try to perform any action that requires
a connection to the SQL Server database then the egg-timer mouse pointer
displays and the database stops responding. It's as if the connection times
out when it becomes inactive for a period of time. Due to a shortage of time
and the impatience of the operators I haven't seen the error message yet
(assuming one eventually appears). The problem is "fixed" by closing the
database and re-opening it again.
If the operators keep using the database constantly then the connection
seems to stay open and the database operates reliably.
I use an ODBC connection using SQL Server authentication. I don't use
Windows NT authentication because I was getting "Cannot generate SSPI
context" errors when I tried to use it (could this be related to the other
problem?).
Any ideas what is wrong and how I can fix it?
How are you connecting, linked tables via DSN or by supplying
connection string in code? (the latter is recommended). You can also
try sticking a SQL Profiler trace to see what's going on at the
server, and try connecting from user's machines using some other
client besides Access.
--Mary
On Tue, 22 Feb 2005 18:21:15 +0100, "Davey" <davey@.hello.com> wrote:

>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users dont
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that requires
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection times
>out when it becomes inactive for a period of time. Due to a shortage of time
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>

Access -> ODBC -> SQL Server connection hangs

I have an MS Access 2003 database that uses a SQL Server 2000 database as
it's back-end. The database runs well most of the time but if the users dont
use the database for a period of time (approx 10 minutes) and return to it
then the connection hangs. When they try to perform any action that requires
a connection to the SQL Server database then the egg-timer mouse pointer
displays and the database stops responding. It's as if the connection times
out when it becomes inactive for a period of time. Due to a shortage of time
and the impatience of the operators I haven't seen the error message yet
(assuming one eventually appears). The problem is "fixed" by closing the
database and re-opening it again.
If the operators keep using the database constantly then the connection
seems to stay open and the database operates reliably.
I use an ODBC connection using SQL Server authentication. I don't use
Windows NT authentication because I was getting "Cannot generate SSPI
context" errors when I tried to use it (could this be related to the other
problem?).
Any ideas what is wrong and how I can fix it?How are you connecting, linked tables via DSN or by supplying
connection string in code? (the latter is recommended). You can also
try sticking a SQL Profiler trace to see what's going on at the
server, and try connecting from user's machines using some other
client besides Access.
--Mary
On Tue, 22 Feb 2005 18:21:15 +0100, "Davey" <davey@.hello.com> wrote:

>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users don
t
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that require
s
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection times
>out when it becomes inactive for a period of time. Due to a shortage of tim
e
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>

Access -> ODBC -> SQL Server connection hangs

I have an MS Access 2003 database that uses a SQL Server 2000 database as
it's back-end. The database runs well most of the time but if the users dont
use the database for a period of time (approx 10 minutes) and return to it
then the connection hangs. When they try to perform any action that requires
a connection to the SQL Server database then the egg-timer mouse pointer
displays and the database stops responding. It's as if the connection times
out when it becomes inactive for a period of time. Due to a shortage of time
and the impatience of the operators I haven't seen the error message yet
(assuming one eventually appears). The problem is "fixed" by closing the
database and re-opening it again.
If the operators keep using the database constantly then the connection
seems to stay open and the database operates reliably.
I use an ODBC connection using SQL Server authentication. I don't use
Windows NT authentication because I was getting "Cannot generate SSPI
context" errors when I tried to use it (could this be related to the other
problem?).
Any ideas what is wrong and how I can fix it?How are you connecting, linked tables via DSN or by supplying
connection string in code? (the latter is recommended). You can also
try sticking a SQL Profiler trace to see what's going on at the
server, and try connecting from user's machines using some other
client besides Access.
--Mary
On Tue, 22 Feb 2005 18:21:15 +0100, "Davey" <davey@.hello.com> wrote:
>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users dont
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that requires
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection times
>out when it becomes inactive for a period of time. Due to a shortage of time
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>

Access -> ODBC -> SQL Server connection hangs

I have an MS Access 2003 database that uses a SQL Server 2000 database as
it's back-end. The database runs well most of the time but if the users dont
use the database for a period of time (approx 10 minutes) and return to it
then the connection hangs. When they try to perform any action that requires
a connection to the SQL Server database then the egg-timer mouse pointer
displays and the database stops responding. It's as if the connection times
out when it becomes inactive for a period of time. Due to a shortage of time
and the impatience of the operators I haven't seen the error message yet
(assuming one eventually appears). The problem is "fixed" by closing the
database and re-opening it again.
If the operators keep using the database constantly then the connection
seems to stay open and the database operates reliably.
I use an ODBC connection using SQL Server authentication. I don't use
Windows NT authentication because I was getting "Cannot generate SSPI
context" errors when I tried to use it (could this be related to the other
problem?).
Any ideas what is wrong and how I can fix it?
How are you connecting, linked tables via DSN or by supplying
connection string in code? (the latter is recommended). You can also
try sticking a SQL Profiler trace to see what's going on at the
server, and try connecting from user's machines using some other
client besides Access.
--Mary
On Tue, 22 Feb 2005 18:21:15 +0100, "Davey" <davey@.hello.com> wrote:

>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users dont
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that requires
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection times
>out when it becomes inactive for a period of time. Due to a shortage of time
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>

Access -> ODBC -> SQL Server connection hangs

I have an MS Access 2003 database that uses a SQL Server 2000 database as
it's back-end. The database runs well most of the time but if the users dont
use the database for a period of time (approx 10 minutes) and return to it
then the connection hangs. When they try to perform any action that requires
a connection to the SQL Server database then the egg-timer mouse pointer
displays and the database stops responding. It's as if the connection times
out when it becomes inactive for a period of time. Due to a shortage of time
and the impatience of the operators I haven't seen the error message yet
(assuming one eventually appears). The problem is "fixed" by closing the
database and re-opening it again.
If the operators keep using the database constantly then the connection
seems to stay open and the database operates reliably.
I use an ODBC connection using SQL Server authentication. I don't use
Windows NT authentication because I was getting "Cannot generate SSPI
context" errors when I tried to use it (could this be related to the other
problem?).
Any ideas what is wrong and how I can fix it?Access 2003/Jet 4.0 has an ODBC setting called ConnectionTimeout which is
"The number of seconds a cached connection can remain idle before timing
out. The default is 600 (values are of type REG_DWORD)." 600 seconds is 10
minutes.
This property is found at
\HKEY_LOCAL_MACHINE\Software\Microsoft\J
et\4.0\Engines\ODBC
On the client where Access is installed, set this to a higher value or 0
for indefinite.
-- james
***Disclaimer: This posting is provided "as is" with no warranties and
confers no rights.***
--
>From: "Davey" <davey@.hello.com>
>Newsgroups:
comp.databases.ms-access,microsoft.public.sqlserver.connect,microsoft.public
.sqlserver.odbc,microsoft.public.sqlserver.server
>Subject: Access -> ODBC -> SQL Server connection hangs
>Date: Tue, 22 Feb 2005 18:21:15 +0100
>Lines: 22
>Message-ID: <381bg7F5hs90lU1@.individual.net>
>X-Trace: individual.net hlPan2h158ALGlSJ0qH+wApbb7gzleZkv9TQYLUP
SiELWze4U=
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
>X-RFC2646: Format=Flowed; Original
>Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.
sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berl
in.de!individual.net!not-for-mail
>Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.odbc:43324
microsoft.public.sqlserver.server:378990
microsoft.public.sqlserver.connect:44465
>X-Tomcat-NG: microsoft.public.sqlserver.connect
>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users
dont
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that
requires
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection
times
>out when it becomes inactive for a period of time. Due to a shortage of
time
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>
>|||How are you connecting, linked tables via DSN or by supplying
connection string in code? (the latter is recommended). You can also
try sticking a SQL Profiler trace to see what's going on at the
server, and try connecting from user's machines using some other
client besides Access.
--Mary
On Tue, 22 Feb 2005 18:21:15 +0100, "Davey" <davey@.hello.com> wrote:

>I have an MS Access 2003 database that uses a SQL Server 2000 database as
>it's back-end. The database runs well most of the time but if the users don
t
>use the database for a period of time (approx 10 minutes) and return to it
>then the connection hangs. When they try to perform any action that require
s
>a connection to the SQL Server database then the egg-timer mouse pointer
>displays and the database stops responding. It's as if the connection times
>out when it becomes inactive for a period of time. Due to a shortage of tim
e
>and the impatience of the operators I haven't seen the error message yet
>(assuming one eventually appears). The problem is "fixed" by closing the
>database and re-opening it again.
>If the operators keep using the database constantly then the connection
>seems to stay open and the database operates reliably.
>I use an ODBC connection using SQL Server authentication. I don't use
>Windows NT authentication because I was getting "Cannot generate SSPI
>context" errors when I tried to use it (could this be related to the other
>problem?).
>Any ideas what is wrong and how I can fix it?
>

Thursday, February 16, 2012

About ODBC + VC++

Hi,

I can't get ntext field value from my database (or nvarchar).

If I write in my database in english, I get only the 2 first letters.

If I write in my database in hebrew, I get gibbrish letters.

please I need some help

I'm using sql serser 2000, CRecordset, CDatabase, ODBC

Code Snippet

CDBVariant val;

rs.GetFieldValue("activity",val);

CString activity = (*activityVal.m_pstring).GetBuffer(0);

I'm sorry but I've not used MFC very much, but I've used ODBC, and this looks to me like you're fetching Unicode characters into ANSI buffers. The first thing I would try is defining your application as a Unicode app by adding the following add the beginning of your code:

#define UNICODE

#define _UNICODE

Here's a link to using ODBC via MFC: http://msdn2.microsoft.com/en-us/library/s9ds2ktb(VS.80).aspx

Hopefully someone else on this alias is more familiar with MFC to help you out.

Good luck!

~Warren

|||

Thank's,

Do you know how can I define these in my project? how to use this?

#define UNICODE

#define _UNICODE

about multiple clients

I have a sql server application program developped with ODBC. The program can
run at different computer and realize synchronization operation. But
sometimes it has error message :
"Attemp to scroll past end or before beginning of data".
Could you tell me the reason ?
it seems the program got failure when trying to find next row, but the
position may not point to an valid row,since the row could be deleted by
other process from another machine.

about multiple clients

I have a sql server application program developped with ODBC. The program ca
n
run at different computer and realize synchronization operation. But
sometimes it has error message :
"Attemp to scroll past end or before beginning of data".
Could you tell me the reason ?it seems the program got failure when trying to find next row, but the
position may not point to an valid row,since the row could be deleted by
other process from another machine.

Monday, February 13, 2012

about GetODBCFieldInfo (MFC)

I use ODBC to operate SQL Server 2000. I want to know the data type for each
column in a table. But for image data, text , varchar... , all the return
value are negative.
In addition, how can I realize a table structure copy with ODBC ?
Any suggestion?
Thanks.
UHow about using SQLColumns

about GetODBCFieldInfo (MFC)

I use ODBC to operate SQL Server 2000. I want to know the data type for each
column in a table. But for image data, text , varchar... , all the return
value are negative.
In addition, how can I realize a table structure copy with ODBC ?
Any suggestion?
Thanks.UHow about using SQLColumns