|
Did you add the local database (from Add/New Item...) into your project? After that it should automatically be listed in the server explorer.
|
|
|
|
|
Thanks Mika,
I added local database into my project. I got following warning
"The data provider required to connect to the local data file could not be found. The file will be added to the project but the typed DataSet associated with the file will not be generated."
I checked in server explorer, no SSCE is listed. When I tried to access the newly added .sdf local database, I got an error "Operation could not be completed. Unspecified error.". This is the case in VS2008 professional edition.
For VS2008 express edition , everything is working fine.
Veena
|
|
|
|
|
Sounds like you have an installation issue. SqlCe library isn't installed for some reason.
Visit: SQL Server Compact 3.5[^] and download the latest version and try to install that. Hope it helps.
|
|
|
|
|
hellow can any one help me in getting week number (sunday - sunday) as week in sql server query.
i am using this but its not giving as sunday to sunday
SELECT StartTime,DATEPART(DAY, StartTime - 1) / 7 + 1 AS theWeekWithinMonth from TT where cardid = '3344'
|
|
|
|
|
Do you mean week numbers as 1-52 (or 53). In that case try:
SELECT DATEPART(WEEK, StartTime)...
If you mean day numbers 1-7 starting from sunday try:
SELECT DATEPART(WEEKDAY, StartTime)...
modified on Thursday, January 8, 2009 7:55 AM
|
|
|
|
|
Kindly help me out.performance of my sql server degrades after power failure.
i ran dbcc checkdb command , but it shows no error.
|
|
|
|
|
This could be a normal situation. When the SQL Server is shut down, it's memory manager is destroyed so there are no more block in the buffer. It takes some time for the database to gather a good mru list of necessary buffers. So basically before the power failure many operations were done in-memory, but now the data must be fetched from the disk. Also what takes time is that if your memory settings are dynamic, SQL Server must increase memory usage as needed. Just make sure that the operating system isn't swapping.
You can use performance manager to monitor if this is the case (since you're not facing any errors). You can also use activity monitor to see if this is disk I/O related.
Also check that there are no problems in errorlog.
|
|
|
|
|
Good Evening,
I'm new to access besides what i did in highschool , My issue is i have to crosstab's in which i want to make a report out of, to look something like this.
Report 1.
Heading.query1 heading.query1 heading.query1 heading.fromquery2 headingfromquery2
name value value value value
name value value value value
name value value value value
My issues is, in design view, i can create a report only with the first query, If i choose the data itms from the 2nd query i lose the first items i already put, with errors saying the item does not exist.
Is there an easyerway?
I appreciate the assistance,
Thanks,
|
|
|
|
|
This possibly is a join but based on the info it's hard to say. Could you give few example rows from the tables and an example what the report would look like with that data.
|
|
|
|
|
Someone else asked this quesion, I can't remember where to reply to his post. But, since I wrote the script already, wanted to post to this good site. The code is written in biterscripting. (http://www.biterscripting.com)
I would like to split a csv file into secondary csv files on a key field. Ex :
all.csv (1st column is the key field for splitting action)
P1;X;10
P1;Y;5
P2;Z;10
P2;A;5
P3;B;30
P3;C;60
P1.csv P2.csv P3.csv
P1;X;10 P2;Z;10 P3;B;30
P1;Y;5 P2;A;5 P3;B;60
Here is the script.
Patrick
# START OF SCRIPT
var str saved_wsep
set $saved_wsep = $wsep
set $wsep=";"
var str output_file
var str input, output, row_str, c1, prev_c1 # c1 for column 1
cat "all.csv" >$input
var int row, rows
set $rows = { len $input }
set $row = 1
while ($row <= $rows)
do
lex -p $row $input >$row_str
wex -p "1" $row_str >$c1
if ($c1 <> $prev_c1)
do
# new output file begins. Is there anything in the previous file.
if ($prev_c1 <> "")
do
echo $output > { echo $prev_c1 ".csv" }
done
endif
set $prev_c1 = $c1
done
endif
set $output = $output + $row_str + "\n"
set $row = $row + 1
done
echo $output > { echo $prev_c1 ".csv" }
set $wsep = $saved_wsep
|
|
|
|
|
Instead of posting this to a forum, you could write an article of it. Articles are the intended way to share solutions and forums for questions.
|
|
|
|
|
Hi friends,
I am working with SQLServer 2005 database (Collation set as Chinese) using odbc api SQLExecDirect and SQLExecute.
Some of my SELECT queries containing some chinese characters works fine with SQLExecute and SQLExecDirectW but NOT with SQLExecDirect. My gut feeling is SQLExecute is converting the query into unicode before it executes. Is this assumption right ?
thank you
cheers
Varghese Paul
|
|
|
|
|
This would depend on the driver and it's implementation. One problem you may encounter is: http://support.microsoft.com/kb/271198[^].
However, if SQLExecDirectW is working, why not use it instead of SQLExecDirect.
|
|
|
|
|
Hi to all,
I have several tables in which all the column names are same.
for example I have 4 tables.
1.glassware
2.barware
3.utensils
In all the three tables I have same columns.Suppose one of the column is "product_id".
Now in my UI I am having a search control based on product_id.
How I will search in all the three tables.
I dont know much abt database.Please help me out.
I used:"select product_id, sh_desc,image,price from Glassware,Barware,Utensils where product_id='"+textbox1.text+"'"
Thanks in advance.
|
|
|
|
|
Hi,
you could use a union to get the rows matching in all three tables:
<br />
SELECT Glassware.product_id, Glassware.sh_desc, glassware.image, glassware.price from glassware where glassware.product_id = '" + textbox1.text + "'<br />
<br />
UNION<br />
<br />
SELECT Barware.product_id, Barware.sh_desc, Barware.image, Barware.price from Barware where barware.product_id = '" + textbox1.text + "'<br />
<br />
UNION<br />
<br />
SELECT Utensils .product_id, Utensils .sh_desc, Utensils .image, Utensils .price from Utensils where Utensils .product_id = '" + textbox1.text + "'<br />
<br />
By the way, please don't attach the value textbox1.text to the sql query directly. Use parameters to do this, because it could be a possible security hole (sql injection).
If all three tables have the same columns why don't you use one table with an additional column, saying whether the row is a glassware, barware or utensils? Makes your queries much simpler.
Hope this helps.
Regards
Sebastian
|
|
|
|
|
Hi,
Thanks a lot.It worked.
I will rather use one table.
cheers,
nirpendra
|
|
|
|
|
Is it possible connect to a remote sql server for test a program on the net or know?
|
|
|
|
|
Programmer. wrote: Is it possible connect to a remote sql server for test a program on the net or know?
Yes, it it possible until you have server IP, Username, Password and Database
|
|
|
|
|
If there are firewalls between the client and the server (and most likely there is), you must have an open port for the conversation.
It may be that you have to have a secure connection to the firewall first and after that the port the sql server is listening is seen as open. After that, it's just a normal connection.
|
|
|
|
|
hi
i am currently using MS SQL and have a window form connecting thru a database remotely thru a static IP(though i am doing it locally now to try)
i would like to know how can i store my user password and username as my window form need to be able to log in and out
currently i connect thru to my database thru
SqlConnection
and open the connection however i am needed to create a user on the security of the ms sql database and map it to my database.
which means that my sql connection statment is currently having a userid and password
is it possible to set the ms sql database or the windowform to loginto the ms sql server and authenticate thru a table in the selected database
|
|
|
|
|
neodeaths wrote: i would like to know how can i store my user password and username as my window form need to be able to log in and out
If you don't ask the user for the password or username could you simply use integrated security (Windows authentication mode).
neodeaths wrote: i am needed to create a user on the security of the ms sql database and map it to my database
This can be done with both Windows authentication mode and SQL Server authentication mode.
neodeaths wrote: is it possible to set the ms sql database or the windowform to loginto the ms sql server and authenticate thru a table
No, to gain access to a table you need to logon first.
|
|
|
|
|
table name trips
starttime endtime triptime Stoprate
14/08/2008 10:39:00 PM 14/08/2008 10:56:00 PM 16 3
14/08/2008 10:59:00 PM 14/08/2008 11:1:00 PM 2
i want the sql queries to create stoprte value
Ahmed El-Badry
|
|
|
|
|
Ahmed El-Badry wrote: i want the sql queries to create stoprte value
Could you be more specific what you're trying to achieve? You want to calculate stoprate value with what kind of formula?
|
|
|
|
|
i want calculate stoprate value
table name trips
starttime endtime triptime Stoprate
14/08/2008 10:39:00 PM 14/08/2008 10:56:00 PM 16 3
14/08/2008 10:59:00 PM 14/08/2008 11:1:00 PM 2
stop value = 14/08/2008 10:56:00 PM - 14/08/2008 10:59:00 PM = 3
i want the sql queries to calculate stoprte value
Ahmed El-Badry
|
|
|
|
|
So the stoprate is endtime from row 1 - starttime from row 2 in minutes? If that's correct, you could use something like:
select datediff(minute,
trips.endtime,
(select min(t2.starttime)
from trips t2
where t2.starttime > trips.endtime))
from trips...
|
|
|
|