|
Have anybody use on your program? i`m having difficulties on it.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
I know this means that my recordset does not convert properly with the SQL table.....but how do I go about finding out what field is not right?
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Can anyone help me determine why I am getting the error "Object must implement IConvertible" when I execute the stored procedure? Below is the code. I have checked the stored procedure, database table column datatype and the sqldbtype and they are identical. So I am a little lost here. Any assistance is greatly appreciated.:
objConn.open
objCom = New SqlCommand("UPLOAD_A", objConn)
objCom.CommandType = CommandType.StoredProcedure
With objCom.Parameters
.Add("@col1", SqlDbType.Decimal, 9)
.Add("@col2", SqlDbType.Decimal, 5)
.Add("@col3", SqlDbType.VarChar, 6)
.Add("@Count", SqlDbType.Int)
End With
With objCom
.Parameters("@col1").Value = dt.Columns(0)
.Parameters("@col1").Precision = 11
.Parameters("@col1").Scale = 2
.Parameters("@col2").Value = dt.Columns(1)
.Parameters("@col2").Precision = 5
.Parameters("@col2").Scale = 4
.Parameters("@col3").Value = dt.Columns(2)
.Parameters("@Count").Direction = ParameterDirection.Output
End With
If objCom.ExecuteNonQuery() > 0 Then
'uploaded records
Dim iCount As Integer
iCount = objCom.Parameters("@Count").Value
Console.WriteLine(iCount)
Console.ReadLine()
Return True
Else
Return False
End If
|
|
|
|
|
cooldev wrote:
why I am getting the error "Object must implement IConvertible" when I execute the stored procedure?
So, do you get this when you ExecuteNonQuery() , or after that? What line does this error occur?
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
This error is thrown on the ExecuteNonQuery() line.
|
|
|
|
|
Hi,
I am running an application across a network which uses SQL server. When It runs I get an error 'Login failed for user guest' in the application. When I run the application on the machine where the server is it runs fine.
How can I enable user access across a network to SQL Server?
Thanks for any help.
|
|
|
|
|
Are you using a trusted connection? If so does the user you are logged in as on the remote machine have an account on the SQL Server?
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Hi,
If your using the SqlServer across the network you should not mention trusted connection = true
if should specify as below
myConnectionString = "Initial Catalog=Northwind;Data Source=servername;User ID=username;password=;Integrated Security=SSPI;";
thx.
ramakrishna.j
|
|
|
|
|
The connection string i am using is as follows.
sql_connection_string = "server=MICMACLAPTOP;Integrated Security=SSPI;database=humantouchSQL;Connect Timeout=20";
I have tried the below string
sql_connection_string = "Initial Catalog=humantouchSQL;Data Source=MICMACLAPTOP;Integrated Security=SSPI;Connect Timeout=20";
But it still does not work.
Any other suggestions?
|
|
|
|
|
Try to check the connection string from http://www.connectionstrings.com/[^]. Good luck
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi,
You should pass the username and password to get sqlserver connection.
thanks
ramakrishna
ramakrishna.j
|
|
|
|
|
If you're using a trusted connection, then make sure you log into the machine where you are running the app with an account that is also an account on the SQL Server database. (By your error message, it looks like you may have logged in as 'Guest.')
To check this, on the SQL Server instance, check in the Security folder, and add your account to the list, and in the Database Access tab, check the database that this account needs to access.
If you don't have rights to add a user to the server, then you will need to ask your DBA to do it for you.
|
|
|
|
|
I have created an application which uses an access database. All is working fine, when I connect to the database as follows:
string strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;";<br />
strConnection += " Data Source=E:\\Web_Development\\famtree\\FamilyTree.mdb;";<br />
strConnection +=" user id=; password=;";<br />
conn = new OleDbConnection(strConnection);
However I now want to use odbc dsn, I have set up the DSN for this database with the name 'FamilyTree' therefore I have changed my code to the following:
string strConnection = "DSN=FamilyTree";<br />
strConnection +=" user id=; password=;";<br />
System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection(strConnection);
However this gives the following error:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
What is the correct connection string to be used? Am I using the correct class to define the connection?
I'd be grateful for any assistance in setting up this connection to work....
Thanks, Richard
|
|
|
|
|
I believe that you just need the DSN name passed and nothing else. Try that.
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Try to check http://www.connectionstrings.com/[^] to solve your problem. Let me know if it is work or not. Good luck
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Thanks, I have tried just DSN=FamilyTree but this acheives the same result... I originally did get the string to use from connectionstrings.com under DNS -> ODBC.
I guess that I am missing some parameters from the connection string, but don't know what they might be. Any more ideas? The alternative is to give up and use a MySQl or MSSQL database, but not sure if this would make any difference.
Richard
|
|
|
|
|
Thanks, I have tried just DSN=FamilyTree but this acheives the same result... I originally did get the string to use from connectionstrings.com under DNS -> ODBC.
I guess that I am missing some parameters from the connection string, but don't know what they might be. Any more ideas? Is there some way of testing that the DSN is set up correctly other than the test I already carried out of viewing a table in excel? The alternative is to give up and use a MySQl or MSSQL database, but not sure if this would make any difference.
Richard
|
|
|
|
|
|
Just a thought....
Since you are building a Calendar/diary program, the database should remain small (~365 entries per year). Since it is small, structures can be parsed at the client with little or no speed issues.
Add a TEXT field to your current sturcture. Fill it with XML.
<ButterFlies>
<ButterFly Type=Monarch Condition=good/>
<ButterFly Type=Moth Condition=poor/>
</BufferFlies>
<WeightLoss>
<FoodEaten Calories=2100/>
<Exercise Task=Running/>
</WeightLoss>
The structures would be easily expanable and upgrades would be simplistic. You will need an XML structure that describes the names & types of what the user wants to collect.
|
|
|
|
|
I am writing a stored procedure, which creates a column using a couple of case statements, it ends up holding an int. Now I need to filter based on that int value, using a variable that is passed into the procedure. I can't seem to do this, because it's not a column in any database. Is there a solution that does not involve temporary tables or a cursor ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Got it. Added an alias for the result set, and therefore able to reference the column.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hello all.
I'm going to use MS Data access (MSDAL) application block in my application.
As I know MSDAL is developed for SQL server only, and my application will work
with SQL server and MSDE as well.
So my question is : does MSDAL work correctly with MSDE, is there performance hit. Some body tested it?
Thanks in advance?
Dima S
|
|
|
|
|
MSDE is in effect SQL Server for workgroups. The same System.Data.SqlClient library objects should work equally well for MSDE as SQL Server.
|
|
|
|
|
Hi
I use SQL Server 2000 + MS search service to add a text search capability to an application.
I use CONTAINS keyword to search and the problem that SQL server raises an error (Execution of a full-text operation failed. A clause of the query contained only ignored words.) When the words entered by user contain noise words like (And-or-also-an-another).
How to make the engine ignores the noise words?
OR:
How to get a complete list of keywords and noise words at runtime to filter them?
Notes:
-noise.dat file does not contain all the invalid characters.
-I can't use FREETEXT instead of CONTAINS because It gets awful result with Arabic language (the major language used in the project)
any comments / suggestions are appreciated and welcomed.
|
|
|
|
|
Hello,
I have a dataTable in my database with columns title, category, problem(description of the problem) and solution. I want to develop a good search mechanism for certain problems so that the user can search for problems – solutions, when he quotes a search term. But I think it is not a good search mechanism when the specific problem with solution is only displayed when the user quotes the correct title of the problem. Is there any other possibility, which is not so difficult to implement?
Regards
mat
|
|
|
|