|
Putting a second copy of the table into the query designer and linking FooID1 and FooID2 to different instances of tblFoo worked. Is there a more graceful way to do this though?
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
select
(select FooText from tblFoo where FooID=a.FooID1),
(select FooText from tblFoo where FooID=a.FooID2)
from lnkFoo a
|
|
|
|
|
Has anybody out there come across problems when trying to search a DB of person names, when those names contain non-standard characters? I've got a DB full of Irish names, a generic search function in my app, and the user is complaining that he can't search independent of fadas. I.E., For the name Ciarán Martin, if he searches for ciaran it doesn't return a row.
This must be an issue in other countries too, I mean all you German developers, come on, with the weird S and the umlaut... How do you get around this? Or is the only way to implement a character map in the .NET code, for all the specific characters in question, to their lower case standard alphabet equivalents? I really really don't wanna do that....
All the dude ever wanted... was his rug back.
|
|
|
|
|
You need to disable accent-sensitivity in the column's collation. You can do this with the ALTER TABLE table ALTER COLUMN statement.
Generally you replace AS (for Accent Sensitive) in the name of the collation with AI (for Accent Insensitive). So if the collation is now Latin1_General_CI_AS (Windows collation, uses 1252 character set, general dictionary sort, case insensitive, accent sensitive), you should change it to Latin1_General_CI_AI .
|
|
|
|
|
Do any one know the tool for migrating the MS Access functions to Oracle Procedures/Functions.
Ravi
|
|
|
|
|
Do you mean the SQL code behind the queries or do you mean VB6 functions?
______________________
stuff + cats = awesome
|
|
|
|
|
Tool to convert functions in MS Access to oracle pl/sql procedure
|
|
|
|
|
|
Either using SQL or C#/ADO.NET is there a way for me to "probe" a stored procedure to return the names of its input parameters to my code?
Thanks.
|
|
|
|
|
Interseting!!! but I dont think its possible.
|
|
|
|
|
In Sql Server theres atleast 2 different ways to achive this
|
|
|
|
|
I assume your talking about sql server?
If it's 2005 you want to use the System Views:
http://www.microsoft.com/downloads/details.aspx?FamilyID=2ec9e842-40be-4321-9b56-92fd3860fb32&displaylang=en[^]
If it's 2000 you want the system tables:
http://www.microsoft.com/sql/prodinfo/previousversions/systables.mspx[^]
Unfortunatly I dont have a link handy on how to use them, but they are pretty straight forward and will provide all you need
Edit: just spotted this article. It looks old but relivent:
http://www.devx.com/vb2themax/Tip/18282[^]
-- modified at 6:16 Tuesday 26th June, 2007
Edit: I also forgot to tell you about DMO and SMO
SMO (Sql Management Objects) in 2005, is a set of objects you can use in .Net that retrive a lot of information about Sql Server and allows you to perform admin operations. They definatly allow you to list the stored procs and all the details about them. A little warning when used with a complex database the SMO's can require a fair bit of tweaking to perform well but it's well worth it if you need that much control.
DMO is similar and used in 2000. I've never personally used DMO so you'dh ave to look into what it can achive.
|
|
|
|
|
exec sp_sproc_columns MyStoredProcesure
i guess is that what you're looking for!
|
|
|
|
|
See ... we live and learn
Nice one
|
|
|
|
|
it woulde be better if you've said
" We learn and live "
|
|
|
|
|
Except the phrase is "We live and learn" :P
We live and learn : (phrase used when sb has heard sthg new, unexpected, and surprising.)
-- modified at 7:31 Tuesday 26th June, 2007
|
|
|
|
|
oh thanks for the information mate
so We Live and Learn!
|
|
|
|
|
I'm not sure I can think of a valid business case as to why you'd want to do that. From a programmatic perspective, you'd still need the type and, depending upon the type, the size of the field. If you know both sides of the system, there are myriad better methods to perform what you're asking.
|
|
|
|
|
Thanks guys I managed to do it in with .NET by using SqlCommandBuilder.DeriveParameters(MySqlCommand)
It was used to create a generic method to loop through values from a DTO and place them into input parameters for a given Stored procedure on the mapper layer of our code. If I cache the results (for speed) it saves us lots of time rewriting very similar stuff inside each mapper to take the dto and asign its values to known paramaters in different procedures.
So what i have is
DataAdapter myMethod(string SProcName, DTOType inputParamsDTO)
{
DataAdapter da = new DataAdapter.
[psudo] open connection to sql
SqlCommandBuilder.DeriveParameters(SProcName)
[psudo] loop
[psudo] if SProcName.Param.Direction == input OR input/Output
[psudo] if inputParamsDTO.Tables[0].Rows[0][i].Contains(SProcName.Param[i].ParamaterName)
[psudo] SProcName.Param[i] = inputParamsDTO.Tables[0].Rows[0]["SProcName.Param[i].ParamaterName"]
[psudo] end loop
[psudo] close connection to sql
[psudo] return da
}
So we pass it a SProc and a DTO (or dataset) and it gives us back a data adapter we can just calla Fill() on.
But it needs to cache some where to stop excessive round trips
|
|
|
|
|
Microsft provide a class to do just this - SQLHelperParameterCache as part of its SQLHelper class as part of its Data Access Application Block. I don't have any links to hand, but google is your friend.
Adam
|
|
|
|
|
Hi all,
I am installing SQL Server 2005 with 2000 already installed. After I go through the whole setup process now with several instances created I can't launch the program from the strt menu. It only gives me the 'configuration tools' option.
Also I think 2000 was installed as a local user but now I am installing from a domain account.
What's going on here, should I install sql using the domain account even though I only plan to use it locally?
Thanx,
Kiefie
The man with an idea.
|
|
|
|
|
You should install Sql Server under a special user acount which you make to only have the needed permissions, this secures it incase it is compramised.
Which edition of Sql Server 2000 are you installing? When you install it is there an option to install the Enterprise Manager and other tools? Thats what you use for managing the server.
|
|
|
|
|
I'm installing sql server 2005 and already have 2000 installed. That's my problem. I can install sql server 2005 but afterwards there is no sql server management studio option in the start menu, only 'sql server 2005 -> Configuration Tools'.
Kiefie
The man with an idea.
|
|
|
|
|
|
It is the full version (Enterprise) I believe.
Another fellow developer here also tried it and got the same results - no Management Studio.
I just started at this company and am trying to get my pc setup...
Kiefie
The man with an plan.
|
|
|
|