|
I took a screenshot of my select statement source code via mysql, I need to know how to exit this prompt and get back to the regular ( mysql> ) prompt. For some reason the sql statement did not run, and i am stuck in some secondary type prompt.
I posted this question a week ago, and the suggestions were to use a semicolon, well that is quite obvious and one of the first things i did, no-go.
or the following link will take you to screenshot.
SS
|
|
|
|
|
Did you try "go" without the quotes?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
One of your quotes is the wrong way round ("` " should be "' ").
|
|
|
|
|
Im trying to load a Crystal Report I've made in Visual Studio to a Crystal Report Viewer on my form. I used the "database expert" to add the connection (ODBC RDO) to my Access 2007 database. The database has no password on it. The Visual Studio field explorer detects all the fields correctly from my command ( SELECT * FROM Table1; ) so I know it can connect to the databse.
The problem is when I run the program I get prompted for the Logon ID and Password with "Logon Failed. Please Try Again." every time I type something in (or dont type anything in). Again there is no password on this DB. There is no reason this prompt to appear since there is no need for logon info to make this connection.
All of my code VB (this is a test project)
Imports CrystalDecisions.CrystalReports.Engine
Form Load:
Dim crpt As New ReportDocument()
Dim rPath As String = "C:\CrystalReport1.rpt"
crpt.Load(rPath)
CrystalReportViewer1.ReportSource = crpt
Does anyone know how to prevent the Login ID and password prompt from being displayed for the connection?
All suggerstions are greatly appreciated
-- modified at 18:07 Thursday 29th November, 2007
|
|
|
|
|
Is there something buried in the CrystalReport1.rpt file that is wanting you to log in?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
This is a simple test program I made becuase I was having the same issue with a project Im working on. I decided to make this test program to rule out some causes of this connection failure. The only thing this report does is display the two columns from my Access 07 databse.
|
|
|
|
|
I wish I could help you out further, but only thing I can think of is that it must be something on the Crystal Reports end. It's been a fair while since I've tackled CR, so my apologies
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Read it into a stream and go from there.
|
|
|
|
|
I need to be able to do this within a stored procedure though. Sorry, I forgot to mention that before.
|
|
|
|
|
I've been given the task of fixing potential (and exploited) SQL-injection errors in an existing ASP (not ASP.NET) project.
I can get the following code to execute (no parameters, no concatenation):
<br />
connString = "Driver={SQL Native Client};Server=server;Database=ACCT;Trusted_Connection=yes;"<br />
Set objConn = Server.CreateObject("ADODB.Connection")<br />
objConn.Open connString<br />
<br />
query = "SELECT SystemCode, SystemName FROM tblSystem WHERE Year = 5"<br />
Set cmd = Server.CreateObject("ADODB.Command")<br />
cmd.CommandText = query<br />
cmd.ActiveConnection = objConn<br />
Set rs = cmd.Execute<br />
However, when I try to convert it to use a parameter, I get an error on the cmd.CreateParameter line of
"ADODB.Command (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
<br />
query = "SELECT SystemCode, SystemName FROM tblSystem WHERE Year = @YEAR"<br />
Set cmd = Server.CreateObject("ADODB.Command")<br />
cmd.CommandText = query<br />
<br />
cmd.Parameters.Append cmd.CreateParameter("@YEAR", adInteger, adParamInput, ,5)<br />
cmd.ActiveConnection = objConn<br />
Set rs = cmd.Execute<br />
Any idea how I can make this work, preferably quickly and easily?
Thanks.
--G
|
|
|
|
|
Hi Glen
What data-type is the Year column? If it is "smallint" then you should use adSmallint.
Regards
Andy
|
|
|
|
|
I think the type is wrong on your parameter, you should be using dbtype.int or SQLdbType.int32
|
|
|
|
|
I am using SQL server 2k, can any one please tell me the length param of data type binary. I have checked it from MSDN http://msdn2.microsoft.com/en-us/library/ms188362.aspx[^]
binary [ ( n ) ]
Fixed-length binary data with a length of n bytes, where n is a value from 1 through 8,000. The storage size is n bytes.
Does that mean that SQL server doesn't store data/image larger than 8 kb.
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|
|
|
Thanks a bunch for clearing my confusion.
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|
|
SQL Server 2000 divides the database's storage into 8KB pages. A single row cannot span pages, it must fit within a single page. The exception is that text, ntext and image columns (referred to as LOBs, Large [or Long] OBjects) are (typically) stored off-page, although you can enable on-page storage with the 'text in row' table option for values that are smaller than 8000 bytes.
Because of this limit, it won't allow you to create a column whose size is bigger than this (8000 bytes for varbinary, 8000 characters for varchar, 4000 characters for nvarchar). If you create multiple large variable-length columns but the actual values you insert exceed 8000 bytes in total, you will get an error.
SQL Server 2005 adds new varchar(max) etc types. These can be used in identical ways to the limited variable-length types but are still stored off-row, unlike text and image columns which had some limitations. This is now the preferred way of storing LOB data. The old way will be removed in a future version of SQL Server (although I think still present in the upcoming SQL Server 2008).
DoEvents : Generating unexpected recursion since 1991
|
|
|
|
|
|
You mean like select * from mytable ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Nope. At some point, you need column names.
|
|
|
|
|
There's the really bad practice of select * . You really should use column names though.
|
|
|
|
|
Given the other replies - what is it that you are trying to do - maybe we can provide some other advice?
|
|
|
|
|
Hi all,
I've been trying to find a similar question but couldn't find one so forgive me if this has already been dealt with.
Is there a way that I can immediately obtain the value of an auto incrementing identity field in SQL if I insert a new record?
Let's say I run the following command:
SqlCommand myCommand = new SqlCommand("INSERT INTO Users (UserName, Age) VALUES ('Joe Bloggs', 30)", myConnection);
but the Users table has an auto incrementing identity field called UserID . Is there a way I can obtain the new value of UserID without having to run a subsequent SELECT UserID FROM Users WHERE... query?
Thanks
|
|
|
|
|
After the INSERT do: SELECT SCOPE_IDENTITY();
This is all in one command. So you then do a ExecuteScalar() to get the value back to your application.
|
|
|
|