|
Thanks a lot for your help
it helps me a lot for my project and i was able to do it in sql
but now i want to write code on vb.net for same purpose.
is that posible?
the data table is already in database (oracle)
and i cant change it.
so where and what i need to do in vb.net. please help
thanks a lot
|
|
|
|
|
Just because the table is in place doesn't mean that you can't use this technique. All you need to do is create the sequence table and the pre-insert trigger. They won't affect your table in the slightest.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
We often need quick access to our sql data. Often we open SQL Analyzer to grab the data when we know exactly what we want. Other non-SQL users wade through the application housing the data.
I just thought of creating a web application where users could "crawl" the data by choosing their database and table and being presented with the data. Then they could drill down in the data by clicking links that are based on the table's foreign keys.
In a perfect world there would be many features such as
* Having custom converters based on the data such as showing text values rather than foreign key ids that link to a lookup table, showing numbers in specified formats, displaying a picture rather than the path, etc.
* Allowing security based on passed credentials or a user entered username/password. Passed credentials would allow access to the data the user has initial rights to. Manual user credentials would be useful for giving access to specific areas not available to the user or testing access to user accounts that applications use.
* Searching
* ???
Before I go and create something like this (which would be fun) does anyone know of something similar? An application with the source code available would be preferable but I'd be willing to take a look at closed commercial apps as well.
Thanks!
Matt Penner
|
|
|
|
|
|
Sorry, not quite sure what you mean by that reply. A little more specific?
I'm not much of a fan of Access. I don't see how it would help me accomplish what I'm trying to do.
Thanks.
|
|
|
|
|
MS Access can link to a SQL Server database and then your users can use the query builder to get to the data. Means that there's no direct link into sql server (if you connect with a read only user) and they will be using an interface that many of them are probably already used to.
|
|
|
|
|
how pictures are stored in a table column
|
|
|
|
|
mavii wrote: how pictures are stored in a table column
put them in a varbinary(max) column.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Is there any way to change the date format in sql server 2005 forever?? I mean, in a way that all connection use this format.
The instruction set dateformat works fine, but I need that all connections start with a certain date format. I can't change the format before the program connects to the database.
Thanks
Peterson
|
|
|
|
|
Peterson Luiz wrote: Is there any way to change the date format in sql server 2005 forever?? I mean, in a way that all connection use this format.
There is no format. It is an illusion. SQL Server does not store dates in any specific format. It may interpret SQL statements as having a certain format, but generally good practice is to use ISO format (yyyy-mm-dd) so there is no ambiguity. Where possible you should be using paramerised queries so that when you pass a date to the database you pass a DateTime object from .NET - which means you no longer have to worry about the date format.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
But in my case, I have an old C++ program that stores the dates in the format mm/dd/yy hh:mm:ss.
If I do a set dateformat mdy, I can do an insert with the mm/dd/yy format. The default of my sql server for some reason is dmy.
When I try to insert the data whitout setting the dateformat to mdy I get I conversion error.
Thanks
Peterson
|
|
|
|
|
Most C++ database frameworks have facilities to pass parameters.
And, just to reiterate, it is generally good practice to use ISO date format rather than a regional variant format. It is the job of the presentation layer of your application to format and interpret dates, not the database.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
DATEFORMAT inherits its setting from the server's default language. You can set this in various ways, see Books Online for details (look for 'default language Option' in the index).
Your database connection method may have a way to specify a different language. Both the ODBC driver and OLE DB provider accept a Language option which can be used to override the default.
|
|
|
|
|
hi i have big problem with my replication
i created replication on maaster server (Sql server enterprise) replication name Client3G (transaction) then i create subscriptions on other sql server instance( developer ) by Client3G
but when run it make error . this error ('the process could not connect to distributo 'data'. the step failed')
123
|
|
|
|
|
if i want to display only last entered 4 records from a table, then which query will be written
|
|
|
|
|
mavii wrote: if i want to display only last entered 4 records from a table, then which query will be written
Well, The table needs a date stamp (DateTime column) that records when data was inserted.
SELECT TOP 4 * FROM MyTable<br />
ORDER BY DateStamp DESC
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
SELECT TOP 4 [fields] FROM [table] ORDER BY DateStamp DESC
SSK.
|
|
|
|
|
its very urgent and need a code
i have to traverse a values in a table of database one at a time of almost 19 digits in string format which is need to retrive from a specific column of a sheet of MS-Excel and need to match with all values in a specific field of that table.
Hussein
|
|
|
|
|
Connect to Excel using ADO (System.Data.Oledb classes for .NET) with the following connection string:
e.g open an OledbConnection using:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= \myfilepath\myexcelsheet.xls
;Extended Properties=\"text;HDR=Yes;FMT=Delimited;\";Extended Properties=\"Excel 8.0;\""
Note that HDR =Yes implies the first row in the Excel sheet is to be treated as column names.
If you use HDR=No, the first row is data, and the sheet column names (A,B,C,D...) are used.
Open the worksheet (in a DataReader or a DataAdapter) using a query like this one:
"select my19digitfild from $MyWorksheetName where mymatchfield = mymatchvalue"
Note the $ in $MyWorkHeetName. The $ indicates the "table" name to use is the worksheet tab name (e.g $Sheet1). If you omit the $, it will look for a named rage top determine the 'table'.
Good luck.
|
|
|
|
|
hi all
i want to download mysql free version to connect it vc++
please tell me a direct link as i need it
i try but not succeeded
thanks
hi
|
|
|
|
|
|
after a spacific search criteria (sql statement )
the results was some names
required :
i want to edit all this records with another name
plz help me
|
|
|
|
|
In your select statement is where you would change column names.
So if your table looks like this:
Select Firstname,
LastName,
account,
PhoneNumber from yourtable
you can change the column names like so:
Select FirstName as First,
LastName as Last,
account as Acct,
PhoneNumber as Phone
from yourtable
Hope that helps.
Ben
|
|
|
|
|
no that's not what i mean
but thnaks 4 ur reply
i mean when i made this statement he gave me a coloum called fatrname
this coloum contain some names like this : maged1
maged2
maged3
all what i mean is if there is any way to type insetad of all these names one word as "maged" only or whatever
in another words i want to integrate all these (maged1,maged2, .... )to the word that i want which is "maged"
|
|
|
|
|
Ok it sounds like you have three columns in a table and you want to return only one column. If all three columns are of the same type you can do a union. So if you have:
Select maged1,
maged2,
maged3 from yourtable
You can do
select maged1 as maged from yourtable
union
select maged2 as maged from yourtable
union
select maged3 as maged from yourtable
Ben
|
|
|
|