|
Hi..
How to copy stored procedures from mdb file for a website to another for another website using Visual studio 2005?
I am too late but i will never give up
|
|
|
|
|
The easiest way would be to open SQL Anaylizer and script the stored procedure to file or new window. Then run that script on the other DB.
|
|
|
|
|
doWhileSomething wrote: script the stored procedure to file or new window
Do you mean copying each stored procedue content (open,select all,copy) to the SQL Analyzer then choose save all Queries.Then open the .sql file and copy its contents and run it in the new DB ?.
I am too late but i will never give up
|
|
|
|
|
Actually what I meant was to open SQLA, select your DB, select programmability, stored procedures, then select a given proedure. Right click on that sproc, select "Script Stored Procedure As.." then the "Create To" option. This would then populate either a file or new qWindow with the code to create the procedure. There are other options there as well.
If you need all of them or the entire DB, then you might want to look at other options.
|
|
|
|
|
I got your idea but Iam using Sql 2000 Analyzer where the aspnetDB.mdf file doesn't appear as a database in the local server.Does the Visual Studio 2005 have a SQLAnalyzer or there is a software which I should install?
I am too late but i will never give up
|
|
|
|
|
You can download the free version of management studio express from MS. It works with both 2000 and 2005.
Your version should work too, but I don't believe the ATTACH method was available in 2000. In your case you would need to copy the DB files to the Data directory the SQL will look in.
e.g. C:\Program Files\Microsoft SQL Server\.....
|
|
|
|
|
I have copied the DB files(.mdf) to the data directory but the database didn't appear in the
SQL 2000 Server Enterprise Manager.Then I tried using Attach database but it doesn't work too(I got an error telling me:couldn't find row in sysindexes...).
It seems that the last choice remains to me is downloading management studio express from MS.
I am too late but i will never give up
|
|
|
|
|
I'm retrieving data from the database and try to pass it on to a javascript function so I can process it. I get a javascript error when I try to pass the value.
Here is my code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim val As String = CType(FormView2.FindControl("ImgList"), HtmlInputHidden).Value
MsgBox(val)
Dim script As String = ""
script = ""
script &= "var str = String(" & val & ");"
script &= "alert(str);"
script &= "setImageArr(" & str & ");"
script &= ""
Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "SetList", script)
End Sub
When I check via MsgBox the right value shows, but it want show in the javascript.
Any suggestions.
Thanks
|
|
|
|
|
The error is right here :
TAK78 wrote: script = ""
script &= "var str = String(" & val & ");"
script &= "alert(str);"
script &= "setImageArr(" & str & ");"
script &= ""
First of all, use a stringbuilder !!
<br />
StringBuilder sbScript = new StringBuilder();<br />
sbScript.Append("<script language='javascript' type='text/javascript'>");<br />
sbScript.Append(Environment.NewLine);<br />
sbScript.Append("alert('");<br />
sbScript.Append(str.Replace("'", "\\'"));<br />
sbScript.Append("')");<br />
sbScript.Append(Environment.NewLine);<br />
scScript.Append(setImageArr('");<br />
sbScript.Append(str);<br />
sbScript.Append(')");<br />
sbScript.Append("</script>");<br />
|
|
|
|
|
TAK78 wrote: I get a javascript error when I try to pass the value.
Standard question #2:
What error message do you get?
TAK78 wrote: script &= "setImageArr(" & str & ");"
As you have no variable named str in your server code, a new empty variable is created. This code will therefore not put any parameter in the Javascript code. You should have Option Explicit in your code to protect you from inadvertently create variables.
You have to put quotes or apostrophes around the string value in the Javascript code. Also you have to encode the value properly, or you will have problems with certain characters.
Dim script As String = _
"<script type=""text/javascript"">" + _
"var str='" + val.Replace("\","\\").Replace("'","\'") + "';" + _
"alert(str);" + _
"setImageArr(str);" + _
"</script>"
---
single minded; short sighted; long gone;
|
|
|
|
|
Thanks a lot works perfect now!!!
So problem was that you have to encode the special characters before you pass it on, right?
Thanks for the help and advice
|
|
|
|
|
And still use a stringbuilder for string manipulation... is works a lot faster :->
|
|
|
|
|
|
Eduard Keilholz wrote: And still use a stringbuilder for string manipulation... is works a lot faster
Not if you write the code as I did, which produces a single call to String.Concat.
---
single minded; short sighted; long gone;
|
|
|
|
|
TAK78 wrote: So problem was that you have to encode the special characters before you pass it on, right?
The main problem was that you didn't have any apostrophes around the string value.
---
single minded; short sighted; long gone;
|
|
|
|
|
Do you mean if the textbox where users can enter a search string is focussed, or just at any time when a user presses the return button on the keyboard...
|
|
|
|
|
after entering the search word in text box i want to perform the search by pressing enter(on keyboard) which i can't do
by clicking the search button with mouse i am able to search but i want to do search by pressing enter on the keyboard thnx for responding
like in google when we enter some word to search and press enter on keyboard it returns the search results like that
-- modified at 10:47 Thursday 19th July, 2007
|
|
|
|
|
Have you tried setting the textbox's AutoPostBack property to true?
|
|
|
|
|
s i enabled it but do i have to do something so that it activates the search
rightnow if i press enter the same page is displaying but i want the search results page to be displayed when enter is pressed
its displaying the search page if i click on search button
when someone clicks the "search" button i am enabling button_click EVENT where i am taking to the search results page
so i have to enable the button_click when some1 presses the enter on keyboard
-- modified at 11:04 Thursday 19th July, 2007
|
|
|
|
|
AH!! That's a difficult way to describe your problem...
erhm... If you remove the code from your button click into a seperate function and call that function from your button click...
<br />
private void DoSearch()<br />
{<br />
}<br />
<br />
button_click()<br />
{<br />
DoSearch();<br />
}<br />
You only have to call the same function from your textbox's TextChanged event.
Doubleclick your textbox to generate a TextChanged event handler, and within that event call :
<br />
DoSearch();<br />
|
|
|
|
|
|
Hey guys,
I'm about to develop a webservice, and ofcourse want to secure that properly. I'm not really into webservice security though, thus posting this question. I installed Web Services Enhancements 3.0 which should be capable of helping me out here.
My first goal is to crypt the messages sent from and to the webservice. We don't have an SSL certificate and do not intend to buy one. How can I set up a fairly good encrypted communicating webservice?
I've read this[^] fine document, not helping me out a lot because it assumes I really know everything about webservices.
Anyone??
|
|
|
|
|
Hi I want to learn ASP.Net form home. Are there any free video tutorials availble on internet ... Please help me
Thanks In advance
|
|
|
|
|
msdn2.microsoft.com/en-us/asp.net/default.aspx on the right hand side u have top webcasts u can find many video tutorials all the best
|
|
|
|
|