|
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
|
|
|
|
|
sorry to tell u that's wrong too
i have table here contain some itmes
after search he gave me this results
maged1 maged2 maged3 ....
and here is my sql statement :select fatrname from reglz where fatrname LIKE '%" & TextBox1.Text & "%'
after that i want to edit them to only the word maged
|
|
|
|
|
You want to issue an update statement, like this:
"update reglz<br />
set fatrname = 'maged'<br />
where fatrname like '%" + TextBox1.Text + "%'" Now, before you go getting all excited about this there are a couple of things you should be aware of.
1. This code is extremely prone to SQL Injection attacks, so I would suggest that you would want to look at changing this to use parameters (without knowing which database you are using, I can't really tell you which parameters to use). (See this[^] article on SQL Injection attacks. Colin does a great job of explaining what it's all about.
2. You should never rely on the default names of properties. Please change TextBox1 to be something meaningful.
|
|
|
|
|
your query is not clear.
is that you want to use column alias for your insert/update/....
Regards
KP
|
|
|
|
|
Please read the forum guidelines. Do not use words like 'urgent' or 'help' in your message titles. Give them some meaning.
Also, do not use text speak.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
I would like to see a function that tells people that their message couldn't be posted because text speak is in the message. Wouldn't be that hard to validate the subject line...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
In Brinkster.com free hosting, I think if you violate hosting rules like setting more ScriptTimeout, your ASP would be renamed as .BADTIMEOUT by an ISAPI filter.
How about having such a ISAPI filter that does the following tasks:
(*) Append 'VIOLATING_POST'
(*) Auto Vote (1) from CP Server itself.
|
|
|
|