|
I am doing some experimenting with using SQL Azure as the data store for a Access 2010 Application. I have created a test database in Access, migrated it to SQL Azure using Microsoft's Server Migration Assistant, and can connect to the migrated Tables both using the links created by the Migration Assistant and using ODBC connections which I have created manually, using the master credentials for the Azure Server. I have created a new login on the Azure server, associated it with a user name for the test database, and given that user read and write privileges on that database. However, when I try to create an ODBC connection with the new login information, the Create New DataSource wizard fails when I 'Finish', saying that "Access to selected database has been denied". Does the limited login/user need some additional privileges, either on the SQL master database or on the test database, or am I missing something else? Almost all the material on the web seems to assume that the developer wants to use the master credentials in this situation (which does, indeed, work), but I don't!
|
|
|
|
|
Hi,
I have a design question that I was hoping a professional could answer. Lets say I have the following one-to-many table relationship between an Account and its Addresses.
create table account (
acctkey int,
acctname varchar(100),
active bit
)
create table acctaddress (
acctkey int,
addkey int,
street1 varchar(100),
isprimary bit
)
An account can have many addresses but only one can be the primary. Does it make sense to include a soft link in the main table to hold the key of the address that is the primary? ie.
create table account (
acctkey int,
acctname varchar(100),
active bit,
primaryaddkey int <
)
This is purely to return the primary address of account (with the best performance in mind). Is this a bad design? Does the need to sync the account and acctaddress tables outweigh the performance advantages?
I would appreciate any thoughts on this.
Thanks
Ryan
|
|
|
|
|
I would go on the side of storing information regarding addresses in the address table rather than the account table.
So have a column on the address table showing it to be the primary address - something like addressContext nvarchar(max) .
In the end it's not a deal-breaker but it does mean that you are de-coupling your data(not sure that is the correct term) by only storing account information in the account table and address information in the address table.
Also don't use varchar(100) as you will run out of room sooner than you think - use nvarchar(max) instead, there will not be much of a performance hit and you are allowing for large addresses.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
I'd disagree with the nvarchar(max), I would only ever use nvarchar if it was a requirement to store unicode and I would place a size limit on the address, make it large but don't use max unless you are intending to use it which an address will never do.
If some pillock has a couple of thousand characters in his address then truncate the idiot, not the data, the pillock!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I would never do the PrimaryAddKey flag on the Account table, I don't even care about the performance difference (unless you have mega addresses it would be minuscule) it introduces a vulnerability into your schema and is therefore wrong.
I would however create an Account view that included the primary address but then I'm a great beleiver in views
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I actually raised this question because I'm at odds with the design. Thanks for the sanity check
|
|
|
|
|
As others have said, I'd leave the primary indicator in the address table, not the account table.
Conceivably, the primary address for an account could change, in which case the address table is updated. The account hasn't changed - the primary address has.
Again, as others have noted, create an acount view that includes the primary address.
To that extent, create an account view that shows all addresses and denotes which one is primary.
Tim
|
|
|
|
|
Using an account view is a good idea. Thank you!
|
|
|
|
|
can i access the oracle(scott user) entire table in sql server2012 ? already i tried with SSMA but i got a error i.e, oracle not connecting and shows the sometimes "no listener",objest is not found.? how can i fix it., any one plz help me.
|
|
|
|
|
Please, see this: Oracle Provider for OLE DB[^] to create a linked server to access an Oracle database instance.
I hope it will be helpful.
|
|
|
|
|
Hi i have this function Val(Right([ContractNo],6) and its in Access format how do i change it to SQL Server
Thanx
|
|
|
|
|
try
substring(ContractNo,len(ContractNo)-5,6)
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
Great, don't forget to upvote posts that help you
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
As Val only returns numbers until the first non number is found, there is no out of the box solution
I would have a read of this
Get only the number from a string, T-SQL???[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Why?
What kind of data are there?
|
|
|
|
|
Assuming in network LAN have got 2 computer : Computer A and Computer B, Computer A installed mySQL and have got IP:192.168.1.100 and port: 2050, Computer B installed SQL Server 2005, form machine B can connection (or link table) to machine A have mySQL ? Is EveryOne this guide can share me with. thank
|
|
|
|
|
You might be able to use OPENROWSET, at least it is a avenue of research!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Well I'll be dammed, thinking about it you can do a linked server to Oracle so it should be logical that the MySQL has been solved as well. Have 5.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In a LAN with multiple computers, a few machines installed MySQL you can use the command line in cmd.exe (or any software) to know how many LAN computers are not installed MySQL ? for example in SQL Server have command line: osql -L
|
|
|
|
|
I’ve tried writing queries but they just don’t work. I tried joining tables, selecting the tables more than once and renaming it using AS.
I’d like to know if my desired output is really possible with mere using access sql ?? I need the query to set in my datatable for the gridview control. I am thinking of creating multiple datatable and assign them to one gridview instead of writing this complex query. But if there is a sql solution for this, I will stick to sql. Please share your ideas. Thank you.
I’ve been stuck with this problem, it’s like I’m trying to turn my rows into column. Here are my tables and the desired output.
Database tables:
TableDATA
ID GB FREE% FS_DATE
1 0.58 43% 8/19/13 1:00 AM
2 2.42 52% 8/19/13 1:00 AM
3 4.93 2% 8/19/13 1:00 AM
4 5.12 75% 8/19/13 1:00 AM
5 0.50 1% 8/19/13 1:00 AM
6 0.582 430% 8/19/13 2:00 AM
7 2.422 520% 8/19/13 2:00 AM
8 4.932 200% 8/19/13 2:00 AM
9 5.122 750% 8/19/13 2:00 AM
10 0.522 100% 8/19/13 2:00 AM
TableFS
ID FS MountPT FS_DATE SERVER_ID
1 /dev/1 a 8/19/13 1:00 AM HP-UX
2 /dev/2 b 8/19/13 1:00 AM HP-UX
3 /dev/3 c 8/19/13 1:00 AM HP-UX
4 /dev/4 d 8/19/13 1:00 AM HP-UX
5 /dev/5 e 8/19/13 1:00 AM HP-UX
6 /dev/1 a 8/19/13 2:00 AM HP-UX
7 /dev/2 b 8/19/13 2:00 AM HP-UX
8 /dev/3 c 8/19/13 2:00 AM HP-UX
9 /dev/4 d 8/19/13 2:00 AM HP-UX
10 /dev/5 e 8/19/13 2:00 AM HP-UX
Required Output:
(8/19/13 1:00) (8/19/13 2:00) (8/19/13 3:00 and so on.....)
FS MountPT GB FREE% GB FREE%
/dev/1 a 0.58 43% 0.582 430%
/dev/2 b 2.42 52% 2.422 520%
/dev/3 c 4.93 2% 4.932 200%
/dev/4 d 5.12 75% 5.122 750%
/dev/5 e 0.50 1% 0.522 100%
modified 18-Aug-13 16:27pm.
|
|
|
|
|
This article [^]may help, it is designed to work with SQL Server, I don't know if it will work with Access.
It requires 2 nested queries, fist prepare your data so you have exactly what is required (join the table) and get the column names to pivot on (Date/Times). This pivot the data on the date/time column.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi...
What the advantages are of object oriented programming over Procedural coding? Thank you...
|
|
|
|
|
You could easily discover papers on the subject through a Google search. Also, this forum is for questions about using Database software.
Use the best guess
|
|
|
|