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

Friday, March 30, 2012

MDB to SDF

Hello, everyone.

I am a new developer of .NET CF. Currently, I have a project that needs transferring tables from a existing Access database to SQL Server 2005 Mobile database. Does anybody know how to do it?

Thanks in advance.

Are you talking about MS Access Database or MS Pocket Access Database. In any case, we dont have any tools for doing that automatically.

However, you can always open two cursors (Datasets) against two DBs and transfer the data one row by row. I know its a slow operation but it is all design time.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Thanks for your help.

It looks like that I have to develop a tool myself.

|||

We are really sorry that we could not help you much in this regard. But we would surely take this as feedback and work on this seriously.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Raise an issue (as a suggestion) in the public Feedback Database if you'd like such a tool to be included in a future SQL Server release:

http://lab.msdn.microsoft.com/productfeedback/

|||

Are you talking about MS Access Database or MS Pocket Access Database. In any case, we dont have any tools for doing that automatically.

However, you can always open two cursors (Datasets) against two DBs and transfer the data one row by row. I know its a slow operation but it is all design time.


Is there any walkthru that I can perview on exactly how to do that?

MDB to SDF

Hello, everyone.

I am a new developer of .NET CF. Currently, I have a project that needs transferring tables from a existing Access database to SQL Server 2005 Mobile database. Does anybody know how to do it?

Thanks in advance.

Are you talking about MS Access Database or MS Pocket Access Database. In any case, we dont have any tools for doing that automatically.

However, you can always open two cursors (Datasets) against two DBs and transfer the data one row by row. I know its a slow operation but it is all design time.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Thanks for your help.

It looks like that I have to develop a tool myself.

|||

We are really sorry that we could not help you much in this regard. But we would surely take this as feedback and work on this seriously.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Raise an issue (as a suggestion) in the public Feedback Database if you'd like such a tool to be included in a future SQL Server release:

http://lab.msdn.microsoft.com/productfeedback/

|||

Are

you talking about MS Access Database or MS Pocket Access Database. In

any case, we dont have any tools for doing that automatically.

However, you can always open two cursors (Datasets) against two DBs

and transfer the data one row by row. I know its a slow operation but

it is all design time.

Is there any walkthru that I can perview on exactly how to do that?

MDB to SDF

My company has purchased the SQL 2005 Server Enterprise and I have imported the Access database to the SQL Server.

I have built a SQL 2005 mobile database (a sdf file) within VS.net 2005. Can any one tell me how to load it to the SQL server management studio and transfer tables from SQL Server Enterprise database to the SQL 2005 Server Mobile database?

By the way, I could not fine the “SQLMobile.sql” file mentioned in the article named “Step by step: Developing a SQL Mobile Application with Visual Studio 2005 and SQL Server 2005”, which I downloaded from Microsoft website. Anyone knows?

Thanks in advance.

There is a MSI in that white paper which you need to download to get SQLMobile.sql.

You can use SQL Server Integration Services to transfer the data between different data bases.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Laxmi NRO MSFT ,

Thank you very much for your help.

I downloaded the MSI and finished the "Step by step" exercise. It is very helpful and I have the confidence to finish my project now.

|||

Thanks alot and pleasee feel free to post your comments on the paper so that we can keep updating it for more and more usefulness.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Hi,

I want to import tables and data in them from an access database(.mdb) to .sdf file (i.e SQL 2005 compact Edition).

Could you please guide me the steps to do this.

Thanks and regards

G Sreenaiah <gsreenaiah@.msn.com>

MDB to SDF

My company has purchased the SQL 2005 Server Enterprise and I have imported the Access database to the SQL Server.

I have built a SQL 2005 mobile database (a sdf file) within VS.net 2005. Can any one tell me how to load it to the SQL server management studio and transfer tables from SQL Server Enterprise database to the SQL 2005 Server Mobile database?

By the way, I could not fine the “SQLMobile.sql” file mentioned in the article named “Step by step: Developing a SQL Mobile Application with Visual Studio 2005 and SQL Server 2005”, which I downloaded from Microsoft website. Anyone knows?

Thanks in advance.

There is a MSI in that white paper which you need to download to get SQLMobile.sql.

You can use SQL Server Integration Services to transfer the data between different data bases.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Laxmi NRO MSFT ,

Thank you very much for your help.

I downloaded the MSI and finished the "Step by step" exercise. It is very helpful and I have the confidence to finish my project now.

|||

Thanks alot and pleasee feel free to post your comments on the paper so that we can keep updating it for more and more usefulness.

Thanks,

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Hi,

I want to import tables and data in them from an access database(.mdb) to .sdf file (i.e SQL 2005 compact Edition).

Could you please guide me the steps to do this.

Thanks and regards

G Sreenaiah <gsreenaiah@.msn.com>

mdb query to adp function conversion failed

Good evening everybody! This is my first post here, necessary because I have recently upgraded from Access *.MDB to Access *.ADP :)

I have a problem with a query that does not appear to have converted correctly. Below is the SQL of the *.mdb and the *.adp. I would be very grateful if somebody could indicate the correct format for the ADP code. I cant find an example in the help file :(

Mdb Query SQL ==========================
SELECT tlkpLoadSize.LoadSizeID, tlkpLoadSize.LoadSizeDisc, tlkpLoadSize.LoadSizeMinLoad, tlkpLoadSize.LoadSizeMaxLoad
FROM tlkpLoadSize
WHERE (((tlkpLoadSize.LoadSizeID)=[Forms]![frmMainQuote]![QuoteLoadSize]));

Adp Function SQL =========================
ALTER FUNCTION qryGetTonne1 (@.Forms___frmMainQuote___CboLorr varchar (255)
)
RETURNS TABLE
AS RETURN (SELECT tlkpLoadSize.LoadSizeID, tlkpLoadSize.LoadSizeDisc, tlkpLoadSize.LoadSizeMinLoad, tlkpLoadSize.LoadSizeMaxLoad
FROM tlkpLoadSize
WHERE (((tlkpLoadSize.LoadSizeID)=@.Forms___frmMainQuote_ __CboLorr)))

Any comment gratefully receivedUp-sizing problems

I still havent found the correct syntax for a query in an adp file. However I did find two more upsizing problems for which I have found a cure, these can be seen in the attached Access 2000 *.mdb file. Run it in mdb then run the upsize wizard and note the problems.

Change True to 1 and False to 0
The first upsizing problem I had was that in an *.mdb file you can use True or False in an SQL statement. However when you upsize you need to change the True to 1, and the False to 0. It might pay, when you are designing your database to think about using 1 and 0 to indicate true or false situations.

Using forms collection can cause a problem
The other problem related nicely to the query problem mentioned above. I found that some code in my form frmSeeTown did not work because the SQL contained a reference to a combo box via the forms collection in the form of:--

[Forms]![frmSeeTown]![cboSelectCounty]

This relates to my query problem because the query with the problem also contained a reference to a combo box through the forms collection. Therefore I am reasonably sure that you cannot reference a combo box this way in an SQL string in an Access Project file. However Im right at the bottom of the learning curve so please educate me.

Now down to the problem!
If you look at the attached *.mdb file you will see that there are three functions behind the form frmSeeTown they are called:-

fBuildStr1() Assigns data from the combo box with me.cboSelectCounty
fBuildStr2() Assigns data using the forms collection (Dont work in *.asp)
fBuildStr3() Assigns data from a variable.

To view the effect of the different methods change the called function name from fBuildStr3 to fBuildStr2

The following NOTES have been extracted from the form frmSeeTown module
'Both of these functions "fBuildStr1" and "fBuildStr2" work OK in an mdb, but "fBuildStr2" won't work in an adp.
'So there are 4 possible options ------

'1) It maybe I'm using the wrong syntax? -- can't find anything in the help? So I think it's something else.
'2) Reference the combo box control with the Me. function. -- Doing it this way could be a problem with sub-forms
'3) Assign the combo box value to variable and use that in the SQL -- this has got to be the way to do it :)
'4) Something else, embarrassingly simple that I don't know about yet :) Hell that's why I'm posting...

'Since writing the above, I have now added a further function fBuildStr3 which assigns the combo box value to a variable and then uses that variable in the SQL code. This appears to work OK.. :||||Found this just now!!!

http://www.utteraccess.com/forums/showflat.php?Cat=&Board=AxxessXP&Number=137340&Forum=AxxessXP&Words=access%20project&Match=Entire%20Phrase&Searchpage=0&Limit=25&Old=allposts&Main=137340&Search=true#Post137340

So I'm outa the woods at last (Famous last words) :) :)

Whos a happy bunny then!!!|||After several days of head scratching, Ive discovered that my original suspicion that there was a problem with the syntax was correct. If you look at the two lines of code below taken from an SQL statement both line 1) and line 2) work in Access mdb format, but only line 2) works in Access adb format.

1) "WHERE (((tlkpUkTowns.TownOnlyCounty) = [Forms]![frmSeeTown]![cboSelectCounty] )) ORDER BY tlkpTowns.TownTown"

2) "WHERE (((tlkpUkTowns.TownOnlyCounty) = " & Forms![frmSeeTown].cboSelectCounty & ")) ORDER BY tlkpTowns.TownTown"

As you can see the SQL in line one is incorrectly formatted. It appears that the SQL engine for an mdb file is more forgiving, and corrects minor mistakes in the SQL string automatically. So I am inferring from this that an adp file uses a different engine to handle the SQL statements. This would make sense, as there are differences in the SQL between the two access formats. However I say again I am very low down on the learning curve and would welcome any input.sql

MDAC update caused access problems

I just updated MDAC on one of my machines and I'm now having trouble accessing my SQL server. It's a local connection using SQLOLEDB in a VB dll. It was working fine before the update and now I get:

Microsoft OLE DB Provider for SQL Server error '80004005'

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

/cms25/CMS.asp, line 33

Most of the information I can find on this refers to TCP/IP connections but the SQL server is local. My connect function looks like this:

Public Sub ADOConnect()

With m_ADOConnection
.Provider = "SQLOLEDB"
.CursorLocation = adOpenStatic
.CommandTimeout = 20
.Mode = adModeReadWrite
.ConnectionString = "Data Source=" & m_strServer & ";Database=" & m_strName & ";" & m_strUsernamePassword
.open
End With

End Sub

On this server, m_strServer = "(local)". What am I missing? Thanks for any help in advance!

a.From which version of MDAC to which version?

On what platform?

Biggest headache I had was that 2.5 default connection library was Named pipes while 2.7 and later, the default was TCP. If you didn't have TCP and DNS configured properly, then the upgrade would result in errors that you may not have noticed previously.

Regards,

hmscott|||I believe I went from something like 2.5 to 2.8 so you might be right. How do I make sure the server is configured properly? Where do I set up named pipes?

UPDATE:

As soon as I enabled the TCP/IP access, it worked so I guess I'm not using named pipes... I'll have to look into this some more because I'd like to avoid using TCP/IP entirely. I'm assuming named pipes is faster?|||Check this KBA http://support.microsoft.com/kb/328306/en-us for the relevant reasons.sql

MDAC Roadmap and .mdb files

I know this isn't SQL server related but this seemed to be the only appropriate forum.

I would like to work with Access databases (.mdb files) via (non-managed) C++. At the moment I'm using the ODBC provider for OleDB. However I see from the MDAC "Data Access Technologies Road Map" that this provider is deprecated. The OleDB/ADO alternatives seem to be focussing on SQL server only; I just want a 'local', non-networked desktop system. What technology should I use that isn't deprecated?

Yours,

Peter

If you are using C++ and either OLE DB or ODBC then you might want to consider SQL Server 2005 Express Edition (http://msdn.microsoft.com/sql/express/).

I'd also recommend looking at C++/CLI (there's an Express edition for Visual Studio 2005 also - http://msdn.microsoft.com/vstudio/express/visualc/default.aspx). It's now very straightforward to mix native and .Net code so you can get the best of both worlds - reuse your code and add new features/UI with .Net at your own pace http://msdn.microsoft.com/msdnmag/issues/04/05/VisualC2005/ and http://msdn.microsoft.com/msdnmag/issues/05/01/COptimizations/

|||

Thanks for your answer. That has given me confidence that I can stick with my current system for the time being, but shift to SQL Server in the future, as required. My database needs are pretty simple and I think I could do it without actually changing any code apart from the connection string.

Pete

Monday, March 26, 2012

MDAC

What version of MDAC does a client pc need to have to
access SQL Server 2000 SP3a, on a Windows 2000 SP3
server. MDAC 2.7 SP1?
What is recommended as a procedure to make sure this
version is rollout to users? How should that work'
What version comes with Windows XP?
Thanks,
JimVersions of MDAC earlier that MDAC 2.7 SP1 can access SQL Server 2000 SP3.
I am not aware of a version of MDAC that will not access SQL Server 2000
SP3. You would not have the ability to use the new features of SQL Server
2000 but still would have access.
Windows XP ships with MDAC 2.7.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||So earlier version of MDAC are ok. Later versions than
what's installed on the SQL box you run the risk of not
being able to access all of the functionality on the SQL
Server.
Great. Thanks.
>--Original Message--
>Versions of MDAC earlier that MDAC 2.7 SP1 can access
SQL Server 2000 SP3.
>I am not aware of a version of MDAC that will not access
SQL Server 2000
>SP3. You would not have the ability to use the new
features of SQL Server
>2000 but still would have access.
>Windows XP ships with MDAC 2.7.
>Rand
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>

Wednesday, March 21, 2012

maybe is a stupid question.. about CASE

I have a little query in access ..now i must write it in T-Sql

the original...
(MSG.IDLINGUA = IIF( EXISTS
(SELECT * FROM ESMESSAGGI AS MSG WHERE MSG.IDLINGUA = [@.idLingua] AND MSG.IDMESSAGGIO = BITS.IDDESCR),
[@.idLingua], LDEF.IDLINGUA))

I can't be able to assign a select value at my field... IDLINGUA to perform another select..
Of course I have used the "select case when exists"

Anyone could be help me ?Post the code you tried that failed.|||By the reference on your where clause to a table or alias called "Bits", it seems this is part of a larger query.
Please, post your whole query.

May I use the JDBC driver of SQLServer2000 to access SQLServer2005?

May I use the JDBC driver of SQLServer2000 to access SQLServer2005?Use SQL 2005 related JDBC driver http://msdn.microsoft.com/data/jdbc/ for such connecitons.|||

The JDBC 2000 driver can only be used to connect to SQL Server 2000. However, the JDBC 2005 driver can make connections to both SQL Server 2000 and 2005. Satya posted the link to the 2005 driver in the prior post. Here it is again: http://www.microsoft.com/downloads/details.aspx?FamilyId=6D483869-816A-44CB-9787-A866235EFC7C&displaylang=en

Thanks,

Jaaved Mohammed

sql

Monday, March 19, 2012

Maximum user connections?

Newbie here.

I've got my database set up in SQL 2000, and have started an Access adp
for a front end. I have 10 licenses, and at the moment the only
accesses are the server through Remote Desktop and one person into the
ADP. I started getting ODBC timeout errors when running a complex
query, so I started poking around. In the logs there's messages saying
the maximum of 10 user connections has been reached, over and over
again. I'm not even certain that these problems are related, but it
doesn't look good.

Why are all 10 connections used when there's only the server and one
client? No one else has access to this server. And how can I stop the
ODBC timeout? That paticular complex query is the whole jsutification
for using SQL over Access, so I kind of need it to work. :)
Thanks in advance, maddman"Maddman" <maddman_75@.yahoo.com> wrote in message
news:1104864763.826733.217190@.f14g2000cwb.googlegr oups.com...
> Newbie here.
> I've got my database set up in SQL 2000, and have started an Access adp
> for a front end. I have 10 licenses, and at the moment the only
> accesses are the server through Remote Desktop and one person into the
> ADP. I started getting ODBC timeout errors when running a complex
> query, so I started poking around. In the logs there's messages saying
> the maximum of 10 user connections has been reached, over and over
> again. I'm not even certain that these problems are related, but it
> doesn't look good.
> Why are all 10 connections used when there's only the server and one
> client? No one else has access to this server. And how can I stop the
> ODBC timeout? That paticular complex query is the whole jsutification
> for using SQL over Access, so I kind of need it to work. :)
> Thanks in advance, maddman

I don't know much about ADPs or ODBC, but you can use sp_who2 to view the
current connections (from Query Analyzer):

exec sp_who2

Note that if you use Query Analyzer for your SQL coding, you may have
multiple connections open - plus another one for the Object Browser - so a
couple of active developers could easily use up the ten connections.

As for the timeout, it may be legitimate if the query runs for more than 30
seconds (which I think is the default for ODBC) - have you run it in Query
Analyzer to see how long it takes? You might also want to check if any
processes are blocking each other (the BlkBy column in the sp_who2 output),
as one connection could time out waiting for another to free a lock.

Simon|||Maddman (maddman_75@.yahoo.com) writes:
> I've got my database set up in SQL 2000, and have started an Access adp
> for a front end. I have 10 licenses, and at the moment the only
> accesses are the server through Remote Desktop and one person into the
> ADP. I started getting ODBC timeout errors when running a complex
> query, so I started poking around. In the logs there's messages saying
> the maximum of 10 user connections has been reached, over and over
> again. I'm not even certain that these problems are related, but it
> doesn't look good.
> Why are all 10 connections used when there's only the server and one
> client? No one else has access to this server. And how can I stop the
> ODBC timeout? That paticular complex query is the whole jsutification
> for using SQL over Access, so I kind of need it to work. :)
> Thanks in advance, maddman

As Simon said, the 10 connections may all come from the same machine.
You can easily have more 10 connections from Access to SQL Server if
you are not careful. sp_who2 as Simon mention should give the origin
of the connections.

It is not likely that the number of connections have anything to do with
the timeout, though.

You say you are using ODBC, but what precisely does this mean? If you
are using ADO, I would suggest that you rip out Driver={SQL Server} from
the connection string and replace it with Provider=SQLOLEDB. Not
that it will resolve the timeout problem, as the 30 seconds default
timeout will be there anyway.

If you are using ADO, set the .CommandTimeout on the Command and Connection
objects to 0, and there will be no more timeouts.

Of course, the query may need tuning as well, for instance adding better
indexes, but that's another story.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Ah, when I said 'query' I should have said 'View'. Can you tell I'm
just coming from Access? :)

Anyway, when I try to run the view by right-clicking and selecting
Return all rows I get the odbc timeout error. This makes no sense to
me, as the tables its looking at are all inside the database, none of
them are going over odbc. I get the same error if I try to view it
from Access. I increased by # of connections to 20, but that didn't
seem to help anything.

Just to be certain, I copied the SELECT statement from the View and ran
it in the Query Analyzer. It ran just fine, took about four minutes to
calculate everything. But I can't get the data as a view for some
reason.|||"Maddman" <maddman_75@.yahoo.com> wrote in message
news:1104937648.507533.88470@.c13g2000cwb.googlegro ups.com...
> Ah, when I said 'query' I should have said 'View'. Can you tell I'm
> just coming from Access? :)
> Anyway, when I try to run the view by right-clicking and selecting
> Return all rows I get the odbc timeout error. This makes no sense to
> me, as the tables its looking at are all inside the database, none of
> them are going over odbc. I get the same error if I try to view it
> from Access. I increased by # of connections to 20, but that didn't
> seem to help anything.
> Just to be certain, I copied the SELECT statement from the View and ran
> it in the Query Analyzer. It ran just fine, took about four minutes to
> calculate everything. But I can't get the data as a view for some
> reason.

4 minutes doesn't strike me as being an acceptable response time.
Perhaps you want to think about de-normalising and doing the calculations
you intimate in triggers...
Or some such.

As people have mentioned, you can clock up a number of connections from the
one access adp.
Perhaps the techniques used or number of licences need to be reconsidered as
well.
More licenses might be cheaper than a complete rewrite.

--
Regards,
Andy O'Neill|||Maddman (maddman_75@.yahoo.com) writes:
> Anyway, when I try to run the view by right-clicking and selecting
> Return all rows I get the odbc timeout error. This makes no sense to
> me, as the tables its looking at are all inside the database, none of
> them are going over odbc. I get the same error if I try to view it
> from Access. I increased by # of connections to 20, but that didn't
> seem to help anything.

I don't know what you mean here when you say that nothing goes over ODBC.
If that means that you are querying table in Access, you need to go to
an Access forum. If the tables really are in SQL Server, yes, then you
are going over ODBC (or OLE DB, depending on which client library you
are using). SQL Server is, just that, a server, and all communication
are through some sort of network connection.

> Just to be certain, I copied the SELECT statement from the View and ran
> it in the Query Analyzer. It ran just fine, took about four minutes to
> calculate everything. But I can't get the data as a view for some
> reason.

If it takes four minutes to run the query from Query Analyzer, and
the default timeout in Access is 30 seconds, guess what happens when
you submit the query from Access?

It appears that you need to increase the timeout. The number of
connections has not anything to do with it.

Now, how you increase the timeout in Access, is definitely a question for
an Access newsgroup. I left a hint in my previous post, but it appears
that you have some view in Access, and it should be clear by now, that
my knowledge of Access is non-existent.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I understand the ODBC timeout when going through access. But when I go
to the View I have set up with this SELECT query, I get the same ODBC
timeout manager. Does it use ODBC to communicate within the components
of the Enterprise Manager?|||I took a look at the structure of the queries. What I've got here is
several views that add up bits of data per ID Code, then a final view
that summarized all of them together. I moved around when some of the
calculations are made and that took care of the problem. Went from 4
minutes to about 10 seconds.

Thanks guys!|||Maddman (maddman_75@.yahoo.com) writes:
> I understand the ODBC timeout when going through access. But when I go
> to the View I have set up with this SELECT query, I get the same ODBC
> timeout manager. Does it use ODBC to communicate within the components
> of the Enterprise Manager?

Eh? I'm sorry you have almost lost me completely.

But if you talk about retrieving the result from view in Enterprise
Manager, yes, you could get an ODBC timeout. Enterprise Manager is a
client, just like Access.

You could get an ODBC timeout in Query Analyzer as well. The difference
is that ODBC has a default timeout of 0, but you can configure one if
you like.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Monday, March 12, 2012

Maximum Numbers of Tables and colums to access in select statement

Hi

I want to get the
Maximum Numbers of Tables and colums to access in select query statement

Regards
AruneshCitations from SQL Books Online:columns: The maximum number of expressions that can be specified in the select list is 4096

Friday, March 9, 2012

Maximum number of columns in an index

I am upgrading from Access, where you can only have 10 fields in a primary key or unique index. Is this also the limit in SQL Server? If not, what is the limit?

Thanks for any help on this.

From Books Online, Topic: 'Create Index'

"Up to 16 columns can be combined into a single composite index key."