Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Thursday, March 29, 2012

Do Sql 2005 and Access not play well together?

Does anyone know if I can't put Access 2003 and SQL 2005 on the same server together? I've got an old, well not that old, application that was farmed out coming back home and apparently it's backend is Access and the frontend is ASP, I think. Anyway, the power's that be would like to upgrade to SQL 2005 and would like everything on the same box together. I've heard rumors that's not possible... Does anyone have any ideas? Thanks a ton.

Nicole (not Anna) Smith

It is NOT a problem to install both Access and SQL Server on the same computer.|||Well as Arnie said, in general it is no problem, don′t know if this is officially supported (like outlook and Exchange isn′t), but I also saw that many times working smootly.

Jens K. Suessmeyer.

http://www.sqlserver2005.desql

Do pass thru query connections persist?

I have an Access 2003 front end with a SQL Server 2005 Express backend. I was thinking of using pass thru queries as row sources for some combo boxes such as states/countries for addresses. My question is do pass thru queries, when used as a row source, keep a connection to the DB server? Or do they get the data, disconnect and populate the control?

I realize I could populate the controls with code, but this seems less hassle and will overcome the ValueList size limit if needed.Unless you explicitely dis-connect the connection always remains open. this will hold true even if you use a DB control.|||Hi

Access will open a connection the first time it interacts with SQL Server (linked table, pass through) and retain this connection until the application closes. A pass through query, however, is like a client side cursor (as I understand it) - it uses no further server resources once it has run.

BTW - disconnected list filling is perfectly simple and more secure than pass throughs:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmart01/html/sa01l8.asp
The bottom entry (Assigning recordsets to controls) is one I like.

HTH|||Pootle that article was very helpful. It also mentioned using a properly shaped recordset for reports which was a question of mine on another post.

I did a quick search on properly shaped recordsets but didn't find anything. Does anyone know what it is?

Using a Access Project I was able to have a report use an ADO recordset however it seems the connection and recordset must remain open the whole time the report is open. When using the a recordset with a control I opened the recordset assigned it to the control and closed it and everything was fine. When I did the same for the report it would not open. If I don't close the recordset or connection the report works fine. Is there anyway around this?

Pootle thanks again for the article.|||Using a Access Project I was able to have a report use an ADO recordset however it seems the connection and recordset must remain open the whole time the report is open. When using the a recordset with a control I opened the recordset assigned it to the control and closed it and everything was fine. When I did the same for the report it would not open. If I don't close the recordset or connection the report works fine. Is there anyway around this?The key will be the cursor location - that is the magic setting that takes you into the world of The Disconnected. Did you set it the location to client in your first attempt (remembering that the default is server)?|||Yes, I copied the code verbatim from the control code. In the control code I had not set the connection cursor so I did it in the report code and it still did not work.

Here is my code behind the report.

Private Sub Report_Open(Cancel As Integer)

Dim conGlob As New ADODB.Connection
Dim rst As New ADODB.Recordset

conGlob.ConnectionString = "Provider=SQLOLEDB;" _
& "Data Source=SERVER;" _
& "Initial Catalog=DatabaseTable;" _
& "Trusted_Connection=Yes;"

conGlob.CursorLocation = adUseClient

conGlob.Open

With rst
.ActiveConnection = conGlob
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.LockType = adLockReadOnly
End With

rst.Open "usp_GetStates", , , , adCmdStoredProc

Set Me.Recordset = rst

rst.Close
conGlob.Close

End Sub|||Your best bet would be to use an access data project and use stored procedures

First time I tried to "upgrade" a consultants "application" I noticed that one form opened 19 connections

1 for every objects data source and an additional connection for any object that was updateable...it was very ugly and very slow|||There's nothing inherent to disconnected access that means you need to open multiple connections. One form, one connection. 19+ connections sounds ugly and there would have been an overhead but I would have thought the other processes (populating 19 objects for starters) would be the killer. I imagine you smoothed a lot of other rough edges to get the improvement I presume you got.|||There's nothing inherent to disconnected access that means you need to open multiple connections. One form, one connection. 19+ connections sounds ugly and there would have been an overhead but I would have thought the other processes (populating 19 objects for starters) would be the killer. I imagine you smoothed a lot of other rough edges to get the improvement I presume you got.

Yeah, it's called a total rewrite using Java and actually doing data modeling with the business BEFORE we did a conversion|||I may have figured it out. I have been using the activity monitor in Management Studio Express looking at the active processes and locks.

If I set the recordset activeConnection to nothing I can then close the original connection without the report closing. In the activity monitor it looks like the connection times out or something. It doesn't disappear right away like when I close the report but it does after awhile even if the report is still open.

Do not render report with no data

Hi!
I would like to stop processing of a report that has no data in a specific
dataset. Is this somehow possible?
In Access its possible to not process a report if there is no data behind
it.
Or is the only way to write an application that checks if the data exist and
if not just skips the Render part?
Thanks for any hints!
rgds,
tomOr can I somehow throw an excpetion inside of the report if a specific
dataset has no data?
"Thomas Kern" <tomiknocker@.hotmail.com> wrote in message
news:OUgDeGX$EHA.3372@.TK2MSFTNGP10.phx.gbl...
> Hi!
> I would like to stop processing of a report that has no data in a
> specific dataset. Is this somehow possible?
> In Access its possible to not process a report if there is no data behind
> it.
> Or is the only way to write an application that checks if the data exist
> and if not just skips the Render part?
> Thanks for any hints!
> rgds,
> tom
>|||Thomas Kern wrote:
> Or can I somehow throw an excpetion inside of the report if a specific
> dataset has no data?
You can use the rowcount-property of the dataset and that the
report-visibility or your dataregion or elements to true or false.
regards
Frank
www.xax.de|||Where is the RowCount property of a dataset?
I need to limit mine...
thanks,
trint
Frank Matthiesen wrote:
> Thomas Kern wrote:
> > Or can I somehow throw an excpetion inside of the report if a
specific
> > dataset has no data?
> You can use the rowcount-property of the dataset and that the
> report-visibility or your dataregion or elements to true or false.
> regards
> Frank
> www.xax.de|||Use the CountRows aggregate function. E.g. =CountRows("DatasetName")
See also:
http://msdn.microsoft.com/library/en-us/rscreate/htm/rcr_creating_expressions_v1_0k6r.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"trint" <trinity.smith@.gmail.com> wrote in message
news:1106067185.185429.115960@.z14g2000cwz.googlegroups.com...
> Where is the RowCount property of a dataset?
> I need to limit mine...
> thanks,
> trint
>
> Frank Matthiesen wrote:
> > Thomas Kern wrote:
> > > Or can I somehow throw an excpetion inside of the report if a
> specific
> > > dataset has no data?
> >
> > You can use the rowcount-property of the dataset and that the
> > report-visibility or your dataregion or elements to true or false.
> >
> > regards
> >
> > Frank
> > www.xax.de
>|||how can I set the report visibility to false?
I really want to prevent to report from beeing generated in this case.
thanks.
"Frank Matthiesen" <fm@.xax.de> wrote in message
news:354qr8F4969gvU1@.individual.net...
> Thomas Kern wrote:
>> Or can I somehow throw an excpetion inside of the report if a specific
>> dataset has no data?
> You can use the rowcount-property of the dataset and that the
> report-visibility or your dataregion or elements to true or false.
> regards
> Frank
> www.xax.de
>
>|||I found the following solution but its more database-centric:
-) Check the @.@.rowcount of the query inside the Stored Procedure.
-) If @.@.rowcount = 0, RAISERROR
here we go: this is becomes an exception in the report and it is not
rendered!
tom
"Thomas Kern" <tomiknocker@.hotmail.com> wrote in message
news:us3ocLa$EHA.2984@.TK2MSFTNGP09.phx.gbl...
> how can I set the report visibility to false?
> I really want to prevent to report from beeing generated in this case.
> thanks.
> "Frank Matthiesen" <fm@.xax.de> wrote in message
> news:354qr8F4969gvU1@.individual.net...
>> Thomas Kern wrote:
>> Or can I somehow throw an excpetion inside of the report if a specific
>> dataset has no data?
>> You can use the rowcount-property of the dataset and that the
>> report-visibility or your dataregion or elements to true or false.
>> regards
>> Frank
>> www.xax.de
>>
>

Sunday, March 25, 2012

do i need to deny everything i don't use ?

hi again
i have an account with its password
with specific permissions,
i have to deny, then, the access
to the rest of the objects ?
i.e. systems stored proc, tables , etc ?
thanks
--
atte,
Hernán Castelo
SGA - UTN - FRBADepends what you want.
The user will only have access to those objects it is granted so there is no
need to deny.
But if the user is then added to a role which has other permissions (or they
are given to public) it will gain them.
If this is not what you want then you should deny permissions as well.
I usually only deny dbwriter to read only accounts and leave the rest to
gain from granted permissions
"Hernán Castelo" wrote:
> hi again
> i have an account with its password
> with specific permissions,
> i have to deny, then, the access
> to the rest of the objects ?
> i.e. systems stored proc, tables , etc ?
> thanks
>
> --
> atte,
> Hernán Castelo
> SGA - UTN - FRBA
>
>|||i'm asking because
i entered with a restricted account
and was able to exec SP_HELPTEXT
and i don't wish that
denying dbwriter sounds good,
how can i disable these type of sp's ?
atte,
Hernán Castelo
SGA - UTN - FRBA
"Nigel Rivett" <sqlnr@.hotmail.com> escribió en el mensaje
news:FA87EBFA-AE01-4BDD-8869-E62687DB27FB@.microsoft.com...
> Depends what you want.
> The user will only have access to those objects it is granted so there is
no
> need to deny.
> But if the user is then added to a role which has other permissions (or
they
> are given to public) it will gain them.
> If this is not what you want then you should deny permissions as well.
> I usually only deny dbwriter to read only accounts and leave the rest to
> gain from granted permissions
> "Hernán Castelo" wrote:
> > hi again
> > i have an account with its password
> > with specific permissions,
> > i have to deny, then, the access
> > to the rest of the objects ?
> > i.e. systems stored proc, tables , etc ?
> >
> > thanks
> >
> >
> > --
> > atte,
> > Hernán Castelo
> > SGA - UTN - FRBA
> >
> >
> >|||Everyone can see the source code, I'm afraid. Closest you can come is creating the procedures using
the WITH ENCRYPTION option (note however that there exists tools to decrypt...).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Hernán Castelo" <bajopalabra@.hotmail.com> wrote in message
news:OO0nNnM0EHA.3416@.TK2MSFTNGP09.phx.gbl...
> i'm asking because
> i entered with a restricted account
> and was able to exec SP_HELPTEXT
> and i don't wish that
> denying dbwriter sounds good,
> how can i disable these type of sp's ?
>
> --
> atte,
> Hernán Castelo
> SGA - UTN - FRBA
> "Nigel Rivett" <sqlnr@.hotmail.com> escribió en el mensaje
> news:FA87EBFA-AE01-4BDD-8869-E62687DB27FB@.microsoft.com...
> > Depends what you want.
> > The user will only have access to those objects it is granted so there is
> no
> > need to deny.
> > But if the user is then added to a role which has other permissions (or
> they
> > are given to public) it will gain them.
> > If this is not what you want then you should deny permissions as well.
> >
> > I usually only deny dbwriter to read only accounts and leave the rest to
> > gain from granted permissions
> >
> > "Hernán Castelo" wrote:
> >
> > > hi again
> > > i have an account with its password
> > > with specific permissions,
> > > i have to deny, then, the access
> > > to the rest of the objects ?
> > > i.e. systems stored proc, tables , etc ?
> > >
> > > thanks
> > >
> > >
> > > --
> > > atte,
> > > Hernán Castelo
> > > SGA - UTN - FRBA
> > >
> > >
> > >
>

Do I need second license?

Hello,
I have MS SQL Server 2005 Standard Edition with one Client Access License.
May I
install the server as Primary on one machine and as Secondary (backup)
with Log Shipping on it on another machine, using same license?
Thanks,
GBYes,
But, note, its there for backup only and should not be used to run queries
etc...
So, if you ship the logs across to the backup server and then use database
snapshots then you are probably breaking the liecence terms and need another
liecence.
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"GB" <gennady@.telus.net> wrote in message
news:79SJf.7479$n67.3175@.edtnps89...
> Hello,
> I have MS SQL Server 2005 Standard Edition with one Client Access License.
> May I
> install the server as Primary on one machine and as Secondary (backup)
> with Log Shipping on it on another machine, using same license?
> Thanks,
> GB
>|||Since GB really asked two questions (one in the subject and one in the body)
in which a YES can answer both but it has opposite meaning I wanted to say:
No you don't need two licenses<g>.
Andrew J. Kelly SQL MVP
"Tony Rogerson" <tonyrogerson@.sqlserverfaq.com> wrote in message
news:O0phfIUNGHA.2472@.TK2MSFTNGP11.phx.gbl...
> Yes,
> But, note, its there for backup only and should not be used to run queries
> etc...
> So, if you ship the logs across to the backup server and then use database
> snapshots then you are probably breaking the liecence terms and need
> another liecence.
> Tony.
> --
> Tony Rogerson
> SQL Server MVP
> http://sqlserverfaq.com - free video tutorials
>
> "GB" <gennady@.telus.net> wrote in message
> news:79SJf.7479$n67.3175@.edtnps89...
>|||Lol - teach me for reading the Q and ignoring the subject - doh!
Absolutely Andrew, and thanks for waking me up!
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:e7XMoyVNGHA.536@.TK2MSFTNGP09.phx.gbl...
> Since GB really asked two questions (one in the subject and one in the
> body) in which a YES can answer both but it has opposite meaning I wanted
> to say: No you don't need two licenses<g>.
> --
> Andrew J. Kelly SQL MVP
>
> "Tony Rogerson" <tonyrogerson@.sqlserverfaq.com> wrote in message
> news:O0phfIUNGHA.2472@.TK2MSFTNGP11.phx.gbl...
>

Do I need ADO 2.8 to connect to SQL Server 2005 from Access?

We have just upgraded to SQL Server 2005 from 2000. We have an MS Access application that connects and links tables from the new SQL Server database. Users are getting errors when creating records for the first time on the subscriber databases. We have reseeded the primary keys on all the tables to no avail. The only thing we can think of that may be a problem is the version of ADO that we're using as a reference in the MS Access application. We have a reference to ADO 2.5 and don't know whether we should be using 2.8. Any suggestions? Thank you.

YOu should be able to use the MDAC 2.5 for basic funtionality (otherwise and for the new features you should use the SNAC driver). Is the SQL Server located on the servers where the application is installed ? SQL Server 2005 will install MDAC 2.8 so installing 2.5 over this version might casue an error on the server side but not if it is only installed on the client side.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Thanks for your response Jens. The Access application resides on the same servers as the databases. Both versions of MDAC exist on each server. It looks like the issues occur soon after the data is synch'd in from the Publisher database. The errors occur on forms that have subforms whose row source is a table, as opposed to a query:

Error Number: 30014

Error: The data was added to the database but the data won't be displayed in the form because it doesn't satisfy the criteria in the underlying record source.

After receiving the error, the users exit out of the application and log back in. They are then able to add more records without receiving any errors. But, like in the Groundhog Day movie, the exact same problem occurs the next morning after sync has run.

|||Hello,
I just got the same error message when trying to use my Access application connected to my newly installed SQL Server 2005.

Did you manage to solve the pb ?

How ?

Thanks

Do I need ADO 2.8 to connect to SQL Server 2005 from Access?

We have just upgraded to SQL Server 2005 from 2000. We have an MS Access application that connects and links tables from the new SQL Server database. Users are getting errors when creating records for the first time on the subscriber databases. We have reseeded the primary keys on all the tables to no avail. The only thing we can think of that may be a problem is the version of ADO that we're using as a reference in the MS Access application. We have a reference to ADO 2.5 and don't know whether we should be using 2.8. Any suggestions? Thank you.

YOu should be able to use the MDAC 2.5 for basic funtionality (otherwise and for the new features you should use the SNAC driver). Is the SQL Server located on the servers where the application is installed ? SQL Server 2005 will install MDAC 2.8 so installing 2.5 over this version might casue an error on the server side but not if it is only installed on the client side.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Thanks for your response Jens. The Access application resides on the same servers as the databases. Both versions of MDAC exist on each server. It looks like the issues occur soon after the data is synch'd in from the Publisher database. The errors occur on forms that have subforms whose row source is a table, as opposed to a query:

Error Number: 30014

Error: The data was added to the database but the data won't be displayed in the form because it doesn't satisfy the criteria in the underlying record source.

After receiving the error, the users exit out of the application and log back in. They are then able to add more records without receiving any errors. But, like in the Groundhog Day movie, the exact same problem occurs the next morning after sync has run.

|||Hello,
I just got the same error message when trying to use my Access application connected to my newly installed SQL Server 2005.

Did you manage to solve the pb ?

How ?

Thanks

Thursday, March 22, 2012

Do I need a Primary Key?

I am programming a site in ASP. I am used to using Access which forces you
to have a Primary Key. However, I am learning to use SQL which does not
seem to force you to have a Primary Key. Do I really need one? Please let
me know and why. Thanks!!Techniclly speaking you don't need one, but I would consider any table
without a primary key poor design.
The main reason you need one is that the primary key guarantees you'll have
a column in your table that you can use to uniquely identify each record.
Without a primary key you could potentialy end up with multiple identical
records in your table which you're not able to identify individualy using a
select, update or delete statement.
HTH
Karl Gram
http://www.gramonline.com
"michaaal" <res0gyio@.verizon.net> wrote in message
news:O6$6#0iDEHA.3784@.TK2MSFTNGP10.phx.gbl...
> I am programming a site in ASP. I am used to using Access which forces
you
> to have a Primary Key. However, I am learning to use SQL which does not
> seem to force you to have a Primary Key. Do I really need one? Please
let
> me know and why. Thanks!!
>|||Hi,
To add on to old post,
1. Enforce uniqueness for values entered in specified columns
2. Will not allow nulls.
3. If you define a primary key for a table in your database, you can relate
that table to other tables, thus reducing the need for redundant data.
This will allow you to have Parent child relation ship with out writing
code.
4. This will allow you to do Cascading (Refer boks inline)
Always for a better database modelling we should enforce Primary key /
Foregn key concept.
Thanks
Hari
MCDBA
"Karl Gram" <NOSPAMkarl@.gramonline.nl> wrote in message
news:#FrwxMkDEHA.2600@.TK2MSFTNGP09.phx.gbl...
> Techniclly speaking you don't need one, but I would consider any table
> without a primary key poor design.
> The main reason you need one is that the primary key guarantees you'll
have
> a column in your table that you can use to uniquely identify each record.
> Without a primary key you could potentialy end up with multiple identical
> records in your table which you're not able to identify individualy using
a
> select, update or delete statement.
> --
> HTH
> Karl Gram
> http://www.gramonline.com
> "michaaal" <res0gyio@.verizon.net> wrote in message
> news:O6$6#0iDEHA.3784@.TK2MSFTNGP10.phx.gbl...
> you
> let
>|||> 3. If you define a primary key for a table in your database, you can
relate
> that table to other tables, thus reducing the need for redundant data.
> This will allow you to have Parent child relation ship with out
writing
> code.
The above statement brings on another question I had... Do I really
WANT to do this type of thing on the SQL server level? Or do I
want to do this type of thing in my code. My first inclination is to do
it in the code, however, I have not really sat down and researched the
possible speed differences. Any comments on this? Thank you!|||"michaaal" <res0gyio@.verizon.net> wrote in message
news:eRB$WFlDEHA.3980@.TK2MSFTNGP09.phx.gbl...
> relate
> writing
> The above statement brings on another question I had... Do I really
> WANT to do this type of thing on the SQL server level? Or do I
> want to do this type of thing in my code. My first inclination is to do
> it in the code, however, I have not really sat down and researched the
> possible speed differences. Any comments on this? Thank you!
Enforcing constraints in the code means that they will only be enforced in
your code. If someone uses Access or similar to access your database
directly they can by-pass all your constraints and wreak havoc.
It is also (IMHO) easier to document and troubleshoot. The constraints are
there as part of your table definition. All your data-centric info is in
one place.
As for speed, if you have the contsraints in SQL Server the optimizer and
can make informed decisions on how best to optimize the queries. Otherwise
in the code you will have to decide how to join the data, which is either
going to be very complicated, or not the best method in every circumstance.
Finally, and this is more a judgement on my programming skills than yours,
constraints work pretty much the way it says on the box. If you are
hand-coding all this, then bugs can creep in, you may not foresee every
eventuality, etc.
So my vote is for data-centric rules to be in the data tier.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 05/03/2004|||No, you should always enforce constraints at the DATA level. Enforcing them
in the code means that your data can become corrupt by someone simply
bypassing your application (e.g. running an insert/update/delete from Query
Analyzer).
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"michaaal" <res0gyio@.verizon.net> wrote in message
news:eRB$WFlDEHA.3980@.TK2MSFTNGP09.phx.gbl...
> relate
> writing
> The above statement brings on another question I had... Do I really
> WANT to do this type of thing on the SQL server level? Or do I
> want to do this type of thing in my code. My first inclination is to do
> it in the code, however, I have not really sat down and researched the
> possible speed differences. Any comments on this? Thank you!
>
>|||RE/
>No, you should always enforce constraints at the DATA level. Enforcing the
m
>in the code means that your data can become corrupt by someone simply
>bypassing your application (e.g. running an insert/update/delete from Query
>Analyzer).
Do you prefer to enforce RI via triggers or the other way?
"Other way" because I don't know enough go spell it out...Converted a few MS
Access DBs and wound up with triggers - so that's all I know. MSDN Univers
al
coming soon - so I guess I'll get the option to go either way via MS Visio's
DB
design tool...
--
PeteCresswell|||No, triggers can be pretty poor for performance, depending on other
circumstances. I prefer traditional primary/foreign key relationships, then
violations are stopped in their tracks rather than after the fact.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"(Pete Cresswell)" <x@.y.z> wrote in message
news:k2op50heohj4o6j7tkgp05o7gk61hf1eue@.
4ax.com...
> RE/
> Do you prefer to enforce RI via triggers or the other way?
> "Other way" because I don't know enough go spell it out...Converted a few
> MS
> Access DBs and wound up with triggers - so that's all I know. MSDN
> Universal
> coming soon - so I guess I'll get the option to go either way via MS
> Visio's DB
> design tool...
> --
> PeteCresswell

Do drag and drop controls create DataSets

When I drag a GridView from the toolbox onto a Webform, and then configure its DataSource is a true DataSet created that I can access in the code behind? When my results return I want to be able to access individual rows and cells, taking their values, assiging them to variables and then using the newly equated variable to perform calculations.

Thank you,

Your GridView is bound to dataset It is simple to access values in dataset: your_DataTable.Rows[rowindex][colunmindex]

Or use GridView1.Rows[rowid].Cells[cellindex] to access the control (or findControl(id) if there are many).

Wednesday, March 21, 2012

Do a lot of linked tables cause block?

Hello, everyone:
There are a lot of Access and Excel tables linked to my SQL Server (SQL2K SP3 on W2K). The end users update those likned tables. I am wondering if there is the block problem. If yes, how to prevent that? Thanks.
ZYTNo, It should not cause any problems. How did you bring it into sql2k

DNS-less connection w/ no prompt VB

I have a problem trying to link my access table using VB
I can connect using the below connection string ...
Driver={SQL
Server};SERVER=MYSERVER;UID=MYUSERNAME;PWD=myPASSWORD;DATABASE=myDATABASE;
WHEN I USE...
Set dbsODBC = OpenDatabase("",False, False, strConnect)
BUT IF I try to disable the prompt using...
Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, strConnect)
AND
Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False,"ODBC;" &
strConnect)
my connection either does not connect or it displays the prompt. I
think the problem has something to do with me not using a DSN, but I
thought I should be able to connect without one. PLEASE HELP!
What am I doing wrong, and why would this be happening?
THANK YOU!!I don't understand your question. Open Database is a method of the Jet
database engine (DAO) used with Microsoft Access, not SQL Server. The
connection string you are using is not the correct syntax for the DAO
OpenDatabase method. If you're trying to open an Access database that has a
table in it that is linked to SQL Server, then the linked table has to have
the DSN-less connection string in it's Connect property and you need to use
the syntax for DAO as the parameter to the OpenDatabase function. But, I'm
having a hard time figuring out why you would want to do this? To connect to
a SQL Server DB from VB you should be using ADO (ActiveX Data Objects). The
connection string you are using *is* the correct syntax for the ADO
Connection object's Open method. No need for Jet or Access at this point.
<stoppal@.hotmail.com> wrote in message
news:1129838783.819043.87440@.o13g2000cwo.googlegroups.com...
> I have a problem trying to link my access table using VB
>
> I can connect using the below connection string ...
>
> Driver={SQL
> Server};SERVER=MYSERVER;UID=MYUSERNAME;PWD=myPASSWORD;DATABASE=myDATABASE;
>
> WHEN I USE...
>
> Set dbsODBC = OpenDatabase("",False, False, strConnect)
>
> BUT IF I try to disable the prompt using...
>
> Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, strConnect)
> AND
> Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False,"ODBC;" &
> strConnect)
>
> my connection either does not connect or it displays the prompt. I
> think the problem has something to do with me not using a DSN, but I
> thought I should be able to connect without one. PLEASE HELP!
>
> What am I doing wrong, and why would this be happening?
>
> THANK YOU!!
>|||thank you for the recommendation I'll try it at work tommorrow.
I'll tell you if it works friday, morning|||GOT IT WORKS, THANK YOU!!!!!!!!!!!!!!!!

DNS-less connection w/ no prompt VB

I have a problem trying to link my access table using VB
I can connect using the below connection string ...
Driver={SQL
Server};SERVER=MYSERVER;UID=MYUSERNAME;P
WD=myPASSWORD;DATABASE=myDATABASE;
WHEN I USE...
Set dbsODBC = OpenDatabase("",False, False, strConnect)
BUT IF I try to disable the prompt using...
Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, strConnect)
AND
Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False,"ODBC;" &
strConnect)
my connection either does not connect or it displays the prompt. I
think the problem has something to do with me not using a DSN, but I
thought I should be able to connect without one. PLEASE HELP!
What am I doing wrong, and why would this be happening?
THANK YOU!!I don't understand your question. Open Database is a method of the Jet
database engine (DAO) used with Microsoft Access, not SQL Server. The
connection string you are using is not the correct syntax for the DAO
OpenDatabase method. If you're trying to open an Access database that has a
table in it that is linked to SQL Server, then the linked table has to have
the DSN-less connection string in it's Connect property and you need to use
the syntax for DAO as the parameter to the OpenDatabase function. But, I'm
having a hard time figuring out why you would want to do this? To connect to
a SQL Server DB from VB you should be using ADO (ActiveX Data Objects). The
connection string you are using *is* the correct syntax for the ADO
Connection object's Open method. No need for Jet or Access at this point.
<stoppal@.hotmail.com> wrote in message
news:1129838783.819043.87440@.o13g2000cwo.googlegroups.com...
> I have a problem trying to link my access table using VB
>
> I can connect using the below connection string ...
>
> Driver={SQL
> Server};SERVER=MYSERVER;UID=MYUSERNAME;P
WD=myPASSWORD;DATABASE=myDATABASE;
>
> WHEN I USE...
>
> Set dbsODBC = OpenDatabase("",False, False, strConnect)
>
> BUT IF I try to disable the prompt using...
>
> Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, strConnect)
> AND
> Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False,"ODBC;" &
> strConnect)
>
> my connection either does not connect or it displays the prompt. I
> think the problem has something to do with me not using a DSN, but I
> thought I should be able to connect without one. PLEASE HELP!
>
> What am I doing wrong, and why would this be happening?
>
> THANK YOU!!
>|||thank you for the recommendation I'll try it at work tommorrow.
I'll tell you if it works friday, morning|||GOT IT WORKS, THANK YOU!!!!!!!!!!!!!!!!

DNS-less connection w/ no prompt VB

I have a problem trying to link my access table using VB
I can connect using the below connection string ...
Driver={SQL
Server};SERVER=MYSERVER;UID=MYUSERNAME;PWD=myPASSW ORD;DATABASE=myDATABASE;
WHEN I USE...
Set dbsODBC = OpenDatabase("",False, False, strConnect)
BUT IF I try to disable the prompt using...
Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, strConnect)
AND
Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False,"ODBC;" &
strConnect)
my connection either does not connect or it displays the prompt. I
think the problem has something to do with me not using a DSN, but I
thought I should be able to connect without one. PLEASE HELP!
What am I doing wrong, and why would this be happening?
THANK YOU!!
I don't understand your question. Open Database is a method of the Jet
database engine (DAO) used with Microsoft Access, not SQL Server. The
connection string you are using is not the correct syntax for the DAO
OpenDatabase method. If you're trying to open an Access database that has a
table in it that is linked to SQL Server, then the linked table has to have
the DSN-less connection string in it's Connect property and you need to use
the syntax for DAO as the parameter to the OpenDatabase function. But, I'm
having a hard time figuring out why you would want to do this? To connect to
a SQL Server DB from VB you should be using ADO (ActiveX Data Objects). The
connection string you are using *is* the correct syntax for the ADO
Connection object's Open method. No need for Jet or Access at this point.
<stoppal@.hotmail.com> wrote in message
news:1129838783.819043.87440@.o13g2000cwo.googlegro ups.com...
> I have a problem trying to link my access table using VB
>
> I can connect using the below connection string ...
>
> Driver={SQL
> Server};SERVER=MYSERVER;UID=MYUSERNAME;PWD=myPASSW ORD;DATABASE=myDATABASE;
>
> WHEN I USE...
>
> Set dbsODBC = OpenDatabase("",False, False, strConnect)
>
> BUT IF I try to disable the prompt using...
>
> Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False, strConnect)
> AND
> Set dbsODBC = OpenDatabase("", dbDriverNoPrompt, False,"ODBC;" &
> strConnect)
>
> my connection either does not connect or it displays the prompt. I
> think the problem has something to do with me not using a DSN, but I
> thought I should be able to connect without one. PLEASE HELP!
>
> What am I doing wrong, and why would this be happening?
>
> THANK YOU!!
>
|||thank you for the recommendation I'll try it at work tommorrow.
I'll tell you if it works friday, morning
|||GOT IT WORKS, THANK YOU!!!!!!!!!!!!!!!!

Monday, March 19, 2012

DMO doesn't work with SQL Server 2005 (Express)?

I have an applications that uses DMO to access SQL Server 2000.
When I tried to run that app against SQL Server 2005 Express CTP,
I got the below error:
Error
[Microsoft][ODBC SQL Server Driver][SQL Server]
To connect to this server you must use SQL Server Management Studio or SQL Server Management Objects (SMO)
OK
Any idea what I'm missing here?
Thanks,
Sarah
DMO is not supported on SQL2005. You need to use SMO.
Chris Wood
"Sarah" <SarahBram@.HotMail.com> wrote in message
news:%23xZE7FzrFHA.904@.tk2msftngp13.phx.gbl...
>I have an applications that uses DMO to access SQL Server 2000.
> When I tried to run that app against SQL Server 2005 Express CTP,
> I got the below error:
> --
> Error
> --
> [Microsoft][ODBC SQL Server Driver][SQL Server]
> To connect to this server you must use SQL Server Management Studio or SQL
> Server Management Objects (SMO)
> --
> OK
> --
> Any idea what I'm missing here?
> Thanks,
> Sarah
|||Hello Chris,
If I complie in SMO will it be backward compatible with SQL 2000 or do I
need to include both in my applications?
Regards,
John
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:OZiB6lzrFHA.248@.TK2MSFTNGP14.phx.gbl...
> DMO is not supported on SQL2005. You need to use SMO.
> Chris Wood
> "Sarah" <SarahBram@.HotMail.com> wrote in message
> news:%23xZE7FzrFHA.904@.tk2msftngp13.phx.gbl...
>
|||Chris Wood wrote:
> DMO is not supported on SQL2005. You need to use SMO.
> Chris Wood
Chris,
There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
Microsoft decided they didn't want to make upgrading DMO apps any more
difficult than they needed to be. The new SQL-DMO is supposed to work
with SQL 2000 and 7. I'm not sure when it will be available for
download if you're not a beta member.
David Gugick
Quest Software
www.imceda.com
www.quest.com
|||David,
Hopefully the new version of DMO comes with the September CTP and before the
RTM (Gold) build.
Thanks
Chris
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:Om36c$zrFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Chris Wood wrote:
> Chris,
> There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
> Microsoft decided they didn't want to make upgrading DMO apps any more
> difficult than they needed to be. The new SQL-DMO is supposed to work with
> SQL 2000 and 7. I'm not sure when it will be available for download if
> you're not a beta member.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
|||David,
Did this make it with the September CTP?
Chris
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:Om36c$zrFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Chris Wood wrote:
> Chris,
> There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
> Microsoft decided they didn't want to make upgrading DMO apps any more
> difficult than they needed to be. The new SQL-DMO is supposed to work with
> SQL 2000 and 7. I'm not sure when it will be available for download if
> you're not a beta member.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com

DMO doesn't work with SQL Server 2005 (Express)?

I have an applications that uses DMO to access SQL Server 2000.
When I tried to run that app against SQL Server 2005 Express CTP,
I got the below error:
--
Error
--
[Microsoft][ODBC SQL Server Driver][SQL Server]
To connect to this server you must use SQL Server Management Studio or SQL Server Management Objects (SMO)
--
OK
--
Any idea what I'm missing here?
Thanks,
SarahDMO is not supported on SQL2005. You need to use SMO.
Chris Wood
"Sarah" <SarahBram@.HotMail.com> wrote in message
news:%23xZE7FzrFHA.904@.tk2msftngp13.phx.gbl...
>I have an applications that uses DMO to access SQL Server 2000.
> When I tried to run that app against SQL Server 2005 Express CTP,
> I got the below error:
> --
> Error
> --
> [Microsoft][ODBC SQL Server Driver][SQL Server]
> To connect to this server you must use SQL Server Management Studio or SQL
> Server Management Objects (SMO)
> --
> OK
> --
> Any idea what I'm missing here?
> Thanks,
> Sarah|||Hello Chris,
If I complie in SMO will it be backward compatible with SQL 2000 or do I
need to include both in my applications?
Regards,
John
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:OZiB6lzrFHA.248@.TK2MSFTNGP14.phx.gbl...
> DMO is not supported on SQL2005. You need to use SMO.
> Chris Wood
> "Sarah" <SarahBram@.HotMail.com> wrote in message
> news:%23xZE7FzrFHA.904@.tk2msftngp13.phx.gbl...
>>I have an applications that uses DMO to access SQL Server 2000.
>> When I tried to run that app against SQL Server 2005 Express CTP,
>> I got the below error:
>> --
>> Error
>> --
>> [Microsoft][ODBC SQL Server Driver][SQL Server]
>> To connect to this server you must use SQL Server Management Studio or
>> SQL Server Management Objects (SMO)
>> --
>> OK
>> --
>> Any idea what I'm missing here?
>> Thanks,
>> Sarah
>|||Chris Wood wrote:
> DMO is not supported on SQL2005. You need to use SMO.
> Chris Wood
Chris,
There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
Microsoft decided they didn't want to make upgrading DMO apps any more
difficult than they needed to be. The new SQL-DMO is supposed to work
with SQL 2000 and 7. I'm not sure when it will be available for
download if you're not a beta member.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||David,
Hopefully the new version of DMO comes with the September CTP and before the
RTM (Gold) build.
Thanks
Chris
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:Om36c$zrFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Chris Wood wrote:
>> DMO is not supported on SQL2005. You need to use SMO.
>> Chris Wood
> Chris,
> There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
> Microsoft decided they didn't want to make upgrading DMO apps any more
> difficult than they needed to be. The new SQL-DMO is supposed to work with
> SQL 2000 and 7. I'm not sure when it will be available for download if
> you're not a beta member.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||David,
Did this make it with the September CTP?
Chris
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:Om36c$zrFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Chris Wood wrote:
>> DMO is not supported on SQL2005. You need to use SMO.
>> Chris Wood
> Chris,
> There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
> Microsoft decided they didn't want to make upgrading DMO apps any more
> difficult than they needed to be. The new SQL-DMO is supposed to work with
> SQL 2000 and 7. I'm not sure when it will be available for download if
> you're not a beta member.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com

DMO doesn't work with SQL Server 2005 (Express)?

I have an applications that uses DMO to access SQL Server 2000.
When I tried to run that app against SQL Server 2005 Express CTP,
I got the below error:
Error
--
[Microsoft][ODBC SQL Server Driver][SQL Server]
To connect to this server you must use SQL Server Management Studio or SQL S
erver Management Objects (SMO)
--
OK
--
Any idea what I'm missing here?
Thanks,
SarahDMO is not supported on SQL2005. You need to use SMO.
Chris Wood
"Sarah" <SarahBram@.HotMail.com> wrote in message
news:%23xZE7FzrFHA.904@.tk2msftngp13.phx.gbl...
>I have an applications that uses DMO to access SQL Server 2000.
> When I tried to run that app against SQL Server 2005 Express CTP,
> I got the below error:
> --
> Error
> --
> [Microsoft][ODBC SQL Server Driver][SQL Server]
> To connect to this server you must use SQL Server Management Studio or SQL
> Server Management Objects (SMO)
> --
> OK
> --
> Any idea what I'm missing here?
> Thanks,
> Sarah|||Hello Chris,
If I complie in SMO will it be backward compatible with SQL 2000 or do I
need to include both in my applications?
Regards,
John
"Chris Wood" <anonymous@.discussions.microsoft.com> wrote in message
news:OZiB6lzrFHA.248@.TK2MSFTNGP14.phx.gbl...
> DMO is not supported on SQL2005. You need to use SMO.
> Chris Wood
> "Sarah" <SarahBram@.HotMail.com> wrote in message
> news:%23xZE7FzrFHA.904@.tk2msftngp13.phx.gbl...
>|||Chris Wood wrote:
> DMO is not supported on SQL2005. You need to use SMO.
> Chris Wood
Chris,
There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
Microsoft decided they didn't want to make upgrading DMO apps any more
difficult than they needed to be. The new SQL-DMO is supposed to work
with SQL 2000 and 7. I'm not sure when it will be available for
download if you're not a beta member.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||David,
Hopefully the new version of DMO comes with the September CTP and before the
RTM (Gold) build.
Thanks
Chris
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:Om36c$zrFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Chris Wood wrote:
> Chris,
> There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
> Microsoft decided they didn't want to make upgrading DMO apps any more
> difficult than they needed to be. The new SQL-DMO is supposed to work with
> SQL 2000 and 7. I'm not sure when it will be available for download if
> you're not a beta member.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||David,
Did this make it with the September CTP?
Chris
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:Om36c$zrFHA.3596@.TK2MSFTNGP15.phx.gbl...
> Chris Wood wrote:
> Chris,
> There is a SQL Server DMO in Beta now for SQL Server 2005. I'm guessing
> Microsoft decided they didn't want to make upgrading DMO apps any more
> difficult than they needed to be. The new SQL-DMO is supposed to work with
> SQL 2000 and 7. I'm not sure when it will be available for download if
> you're not a beta member.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com

DMO & .NET: How to get default database

I have a SQL2K instance that has granted me access through an unusual setup.
The SQL2K instance has granted me access through BUILTIN\Administrators by
including "NT_Authority\Authenticated Users" as part of that Windows Group.
Based on that, using DMO and C#, I need to be able to determine the default
database context. Normally, using DMO, you can access the Database property
off of the Login object, however, since my login name "DOMAIN\lgrissom" is
NOT explicitly defined anywhere, that won't work. Any ideas appreciated.
Lee
I found "SELECT DB_NAME()" T-SQL command, and used ADO.NET to execute that
against my ADO.NET connection instead of relying on my hidden DMO
connection. Works great.
Lee

Sunday, March 11, 2012

DLookup equivalent in SQL Server

I am migrating a student database from Access to SQL Server. In Access
I have a query that displays grade information (grades are calculated
on a 12-point scale). In the query I average the students' scores and
store it in a column called Avg. I look up and display the equivalent
grade letter using Access' DLookup function from a table called
GradeTable_tbl. Here is how it's built in Access:
Grade: DLookUp("[grade_letter]","GradeTable_tbl","[grade_num]= " &
Int([Avg]))

Here is the structure of the GradeTable_tbl:

grade_num grade_letter
0 F
1 F
2 D-
3 D
..
..
..
10 B+
11 A-
12 A

How would I do the same thing in SQL Server? I want my output to be
something like:

Student Score1 Score2 Score3 Avg Grade
Bob 12 10 8 10 B+
Nancy 12 11 11 11 A-
etc...

I appreciate your feedback!

-Paul
--
"You never know enough to know you don't know"On 16 Feb 2005 06:59:35 -0800, Paul wrote:

> I am migrating a student database from Access to SQL Server. In Access
> I have a query that displays grade information (grades are calculated
> on a 12-point scale). In the query I average the students' scores and
> store it in a column called Avg. I look up and display the equivalent
> grade letter using Access' DLookup function from a table called
> GradeTable_tbl. Here is how it's built in Access:
> Grade: DLookUp("[grade_letter]","GradeTable_tbl","[grade_num]= " &
> Int([Avg]))
> Here is the structure of the GradeTable_tbl:
>
> grade_num grade_letter
> 0 F
> 1 F
> 2 D-
> 3 D
> .
> .
> .
> 10 B+
> 11 A-
> 12 A
>
> How would I do the same thing in SQL Server? I want my output to be
> something like:

Select S.Student, S.Score1, S.Score2, S.Score3, S.Avg,
G.Grade_Letter AS Grade
from Student AS S
inner join GradeTable_tbl AS G on S.Avg = G.grade_num|||Perfect - thanks! I had tried doing this with a "where" clause. Does
this not work?

Thanks again for your input.|||On 16 Feb 2005 17:19:19 -0800, Paul wrote:

> Perfect - thanks! I had tried doing this with a "where" clause. Does
> this not work?
> Thanks again for your input.

A WHERE clause should work the same - it even generates the same execution
plan.

Select S.Student, S.Score1, S.Score2, S.Score3, S.Avg,
G.Grade_Letter AS Grade
from Student AS S, GradeTable_tbl AS G
where S.Avg = G.grade_num

DLookup -> Timeout

Hello everybody...
I've got a little problem using DLookups in VB (Access) with MS Sql 7.0.
I'm using it to get some data while looping trough a recordset (while not rs.eof ... dlookup ... wend) - the problem is - always on the 81'st recordset I get a timeout ... i wait a couple of seconds and then the code gets halted, press play again and it works... does anybody know a solution to this problem? should i do a rs.open instead of a dlookup?

Thanks for helpin'!

Greetz - Marcextension of upper thread...
I've tried with an rs.open also, same problem after 80 records...
It seems like a max-login restriction in the sql server or something...

Anyone any Idea?

thx

DLL missing or ??

I have SQL server 2000 and access 2003 adp file always disconnect
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection
run-time error 429
ActveX component can't create object
How repair this without reinstall all'Hi
This seems to get asked quite a lot http://tinyurl.com/9aypy
Some suggested solutions may be
http://support.microsoft.com/kb/q189366/
http://tinyurl.com/aofef
http://tinyurl.com/eyt7r
John
"Valentin Albastroiu" wrote:

> I have SQL server 2000 and access 2003 adp file always disconnect
> Dim cnn As ADODB.Connection
> Set cnn = New ADODB.Connection
> run-time error 429
> ActveX component can't create object
> How repair this without reinstall all'
>
>|||The PC on which you install the application must have the same version or
greater of MDAC (Microsoft Data Access Components) that was on the
development PC when the application was compiled. If this error is occurring
on the development PC, then perhaps the MDAC components or configuration got
corrupted somehow. Either way, consider downloading and running the latest
verison of MDAC on both the development and end user PCs.
http://msdn.microsoft.com/library/d...mdacinstall.asp
"Valentin Albastroiu" <vali_albastroiu@.hotmail.com> wrote in message
news:uzl%23tZByFHA.736@.tk2msftngp13.phx.gbl...
>I have SQL server 2000 and access 2003 adp file always disconnect
> Dim cnn As ADODB.Connection
> Set cnn = New ADODB.Connection
> run-time error 429
> ActveX component can't create object
> How repair this without reinstall all'
>