|
|
Will this[^] be of any help?
|
|
|
|
|
Thanks everyone!!
I solved the problem.Well..the mistake was quite simple.I had been giving the hostname as hostname\sqlexpress but it shud have been only hostname.
Rest everything was working fine.
Cheers!
confused
-- modified at 5:22 Friday 5th October, 2007
confused
|
|
|
|
|
Hi,
I am using .Net 1.1 for my web application.
And my database server is SQL Server 2005.
My application is running fine, as i can login to it and also able to view pages. But when i open Order management(having 3K records) its give me error,
General Network Error. Check your network documentation
I have also searched many articles and tried following solutions but nothing working
- connectiontimeout = 0, max pool size = 7500/100, pooling = false
- SSL disabling enforce security false as mentioned in microsoft kb article.
And there's nothing any issue with hardware/firewall as my application's login and other forms are working fine(which use same database with same connection string)
Can any one please help me to solve this error?
With Regards,
Mayank Prajapati
MCP, MCTS .Net 2.0
|
|
|
|
|
While reading through a list of tables names with a cursur the table name is picked up.
I then try to use this table name to create a table and I get the following message.
Must declare the scalar variable "@tblSQLTableNames".
I declare the following then try to set the name to a variable.
DECLARE @tblSQLTableNames TABLE(strName VARCHAR(10));
SET @tblSQLTableNames = strSQLTableNames;
How do you resolve this problem.
I'd appreciate any help concerning the above,
Michael
|
|
|
|
|
Are you talking about creating tables on the fly?
Will this[^] be of any help?
|
|
|
|
|
You have to insert data into the @tblSQLTableNames table variable.
|
|
|
|
|
We have a client/server database app that uses ADO.Net and runs over a LAN.
One potential customer asks why we don't use a secure network connection (we deal in a lot of personal info) for our DB traffic, and I want to say that ADO.Net is 'secure enough', as we only operate over a company LAN. But I have to admit I'm not sure.
We do all the standard stuff (DB permissions, Windows authentication, encryption of connection strings and passwords, validate input values, role based controls etc) but I am wondering about the network transport aspect of ADO.Net. MSDN doesn't say much other than you can encrypt sensitive data (but all our data is sensitive!) or use a secure connection.
How easy is it to snoop ADO.Net traffic over a standard connection?
Does anyone here use ADO.Net with either encryption or a secure connection (IPSec/SSL)?
Ta, Adam
|
|
|
|
|
adambl wrote: How easy is it to snoop ADO.Net traffic over a standard connection?
Not sure. You could just send everything through an encrypted channel.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have Error Message #3251 that occurs when I try to update one of the fields from one table based upon the value stored in another table. I am trying to compare the values of several fields in each of two tables, and when there is a match, I would like to assign the value of the second table to the value of the first table. When all records have had assignments, then I would perform a link between the first table and another table in the database, and then export the results with a portion of the data from each of the two tables in a query. Seems easier than trying to match a composite key from one table against a composite key from the other table. Besides, I don't think it is possible to compare composite keys. It seems better to merely compare indexes.
Why doesn't it permit me to update the first table based upon results from the second table? I believe it has something to do with the Lock Type because the error message states: "Error and Error #3251: ADODB.Recordset: Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype." I need some assistance here.
Here is the code so far:
Private Sub ProcessHeadcountRecords()
Dim dbsHeadcount As Database
Dim Cnxn As ADODB.Connection
Dim strConn As String
Dim rstInputFile As ADODB.Recordset
Dim cmdSQLInputFile As ADODB.Command
Dim strSQLInputFile As String
Dim rstHyperionMany As ADODB.Recordset
Dim cmdSQLHyperionMany As ADODB.Command
Dim strSQLHyperionMany As String
Dim rstHyperionOne As ADODB.Recordset
Dim cmdSQLHyperionOne As ADODB.Command
Dim strSQLHyperionOne As String
Dim strDBPath As String
Dim strFileName As String
Dim strMessage As String
Set dbsHeadcount = CurrentDb
Set cmdSQLInputFile = New ADODB.Command
Set cmdSQLInputFile.ActiveConnection = Application.CurrentProject.Connection
strSQLInputFile = "SELECT [COUNTRY], [TYPE], [BUSINESS UNIT], " & _
"[L/R/G], [REGION], [JOB FUNCTION], [09/12/2007 Reported], " & _
"[NUMINDEX] FROM [TBLINPUTFILE]"
cmdSQLInputFile.CommandType = adCmdText
cmdSQLInputFile.CommandText = strSQLInputFile
Set rstInputFile = cmdSQLInputFile.Execute()
rstInputFile.MoveFirst
Set cmdSQLHyperionMany = New ADODB.Command
Set cmdSQLHyperionMany.ActiveConnection = Application.CurrentProject.Connection
strSQLHyperionMany = "SELECT [COUNTRY], [TYPE], [BUSINESS UNIT], " & _
"[L/R/G], [REGION], [JOB FUNCTION], [NUMFOREIGNKEY], [09/12/2007 Reported] " & _
"FROM [TBLHYPERIONMANY]"
cmdSQLHyperionMany.CommandType = adCmdText
cmdSQLHyperionMany.CommandText = strSQLHyperionMany
Set rstHyperionMany = cmdSQLHyperionMany.Execute()
Do Until rstInputFile.EOF
With dbsHeadcount
strSQLHyperionMany = "SELECT [COUNTRY], [TYPE], " & _
"[BUSINESS UNIT], [L/R/G], [REGION], [JOB FUNCTION], " & _
"[NUMFOREIGNKEY], [09/12/2007 Reported] " & _
"FROM [TBLHYPERIONMANY] " & _
"WHERE [COUNTRY]='" & rstInputFile![COUNTRY] & "' " & _
"AND [TYPE]='" & rstInputFile![Type] & "' " & _
"AND [BUSINESS UNIT]='" & rstInputFile![BUSINESS UNIT] & "' " & _
"AND [L/R/G]='" & rstInputFile![L/R/G] & "' " & _
"AND [REGION]='" & rstInputFile![REGION] & "' " & _
"AND [JOB FUNCTION]='" & rstInputFile![JOB FUNCTION] & "'"
MsgBox (strSQLHyperionMany)
rstHyperionMany.Requery
'If rstInputFile![COUNTRY].RecordCount = 1 Then
rstInputFile![NUMINDEX] = rstHyperionMany![NUMFOREIGNKEY] /// HERE IS THE ERROR LINE WHERE I CANNOT ASSIGN VALUES
'Else
'MsgBox ("Record not found")
'End If
End With
rstInputFile.MoveNext
Loop
End Sub
|
|
|
|
|
new_phoenix wrote: Set rstHyperionMany = cmdSQLHyperionMany.Execute()
The Execute method returns a read-only recordset. You should use the Recordset.Open() method and specify an appropriate CursorType e.g. adOpenKeyset to make your recordset updateable.
Paul Marfleet
|
|
|
|
|
Hi,
I want to update the year in the datecolumn which has dd/mm/year format.
I just want to update the whole table and set the year to 2007 with out changing the month and date.
can u suggest me an answer
Thnks
Kittu.
|
|
|
|
|
Follow this link[^] to get the code for a useful UDF that will allow you to construct new datetime values.
Paul Marfleet
|
|
|
|
|
Does anyone know how to build an installer that will automatically install your database if it doesn't already exist? I am using Visual Studio 2005 Team, with SQL Sever 2005...I figured maybe using custom actions a script could be run to install the database before installing the application...any ideas?
Thanks for any help
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
I have an ID that increments automatically when I insert, but when I delete a record it never creates that ID again. I want my records to be numbered sequentially from zero up without skipping numbers. Thanks guys.
|
|
|
|
|
Dio22 wrote: I have an ID that increments automatically when I insert, but when I delete a record it never creates that ID again. I want my records to be numbered sequentially from zero up without skipping numbers. Thanks guys.
That is expensive to do because you have to renumber all items that come after the deleted item. Indexes will need to update themselves. Referential integrity has to be take into account (i.e. you will have to change the foreign keys on all tables that reference the one you are renumbering)
Unless you have an exceptionally compelling reason you should just leave the blanks where they are.
|
|
|
|
|
What is the value of re-numbering/re-using a previous key? If you are looking for a sequence of insert then add a DateTime column to your table and sort by that.
|
|
|
|
|
I suppose you're both right, I'm just obsessive about having things in order I suppose. I was going to access them in C# using a for loop that incremented by one. I can do something else though. Thanks for the input! Learn something new every day.
|
|
|
|
|
Hi.
How can I set Password for a DB (SQL Server), so that when opening a DB in Enterprise Manager, first ask Password?
Best wishes
|
|
|
|
|
Set your security correctly. It doesn't really make sense to put an additional password on the DB when the security system supports all necessary rights at the user (login) level.
|
|
|
|
|
Hi,
I'm working with SSRS. i need a report which will have an index page along with it. could any1 guide me through this??
Thanks,
|
|
|
|
|
I'm trying to send an INSERT and then have the server reply with the unique ID. Do these have to be seperate statements? can someone help me with the syntax?
here's what i'm trying, it doesnt return anything..
INSERT INTO QAHist
(Description, Handling, Cause, RecDate, Authors, ImageURL)
VALUES ('blah', 'moo', 'die', 'punk', 'arg', 'http://')
SELECT SCOPE_IDENTITY() AS [SCOPE_IDENTITY]
-- modified at 8:57 Wednesday 3rd October, 2007
|
|
|
|
|
Dio22 wrote: Do these have to be seperate statements?
Are you running this in stored procedure ? SCOPE_IDENTITY() returns the last value inserted into identity column in the same scope . Alternatively try IDENT_CURRENT() also. This returns last identity value for the table. It's not scope specific
|
|
|
|
|
It's not in a stored procedure, it's actually eventually going to be a call from a C# program. I'm just running it in a query analyzer right now.
|
|
|
|
|
Hi all,
Is there any way to retrieve the creation date of each row in a SQL table.
In my old table, I don't have [Creation Date] column. Table has already been created and data is also there. But i need to retrieve when each individual row of that table had been created. Do SQL maintain any log for each update of the table?
Please do suggest me what to do.
|
|
|
|