|
Hello friends,
I am trying to insert records into table simple table named 'user' using sql server 2005 but i got dis error message what it means..and how to resolve it...
Server: Msg 128, Level 15, State 1, Line 3
The name is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Please help me....
|
|
|
|
|
Amit.Jagtap.nsk wrote: I am trying to insert records into table simple table named 'user' using sql server 2005
Post the query you are using for this...
|
|
|
|
|
USER is a reserved word. Try using [User] or, if the Quoted Identifier option is enabled, "User" .
|
|
|
|
|
Hi All,
I have a .sql file with all my queries written in it. Now I want to know, Is it possible to run this sql file in SQL Server 2005 Express Edition like we can do in Oracle? If it is possible then tell me how to do it?
Thanx in advance for any kind of help.
Regards,
Paramhans Dubey.
|
|
|
|
|
You'll need the Sql Server Express Management Studio if you want the official IDE to do this stuff in.
|
|
|
|
|
You certainly can. Use the sqlcmd.exe[^] command line utility.
|
|
|
|
|
You can run them using the osql tool. Use osql -S (local)\Server -i <<filename.sql>> . There are other switches you may need to set such as the user id and password. To find out what the options are, type in osql /? .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi,
I am using vb.net 2005 with the report viewer control and the built-in
reports (NOT CRYSTAL REPORTS). The report viewer fills a regular form,
which when opened grabs the data for the report (based on certain parameters)
The reports themselves are RDLC files.
following code properly display the preview of my report
Private Sub ShowReport(ByVal Id As Long)<br />
Dim mdIns As New mdGlobal<br />
Dim str As String<br />
Dim AwiCashFlowDataSet As New DataSet<br />
str = "SELECT * FROM Analysis where c_id=" & Id<br />
CashFlowDataSet = mdIns.GetResultFromQuery(str) 'retun dataset with data<br />
CashFlowDataSet.Tables(0).TableName = "ReturnOnCash"<br />
<br />
Dim RDS As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource<br />
ReturnOnCashBindingSource.DataSource = CashFlowDataSet<br />
ReturnOnCashBindingSource.DataMember = "ReturnOnCash"<br />
RDS.Name = "CashFlowDataSet_ReturnOnCash"<br />
RDS.Value = ReturnOnCashBindingSource<br />
Me.ReportViewer1.LocalReport.DataSources.Add(RDS)<br />
If mdChecking.ReportNumber = 1 Then<br />
ReportViewer1.LocalReport.ReportEmbeddedResource = "Analysis.rptReturnOnCash.rdlc"<br />
Else<br />
ReportViewer1.LocalReport.ReportEmbeddedResource = "Analysis.rptCashFlow.rdlc"<br />
End If<br />
<br />
Me.ReportViewer1.RefreshReport()<br />
If IsPrint = False Then<br />
Me.Show()<br />
Else<br />
IsPrint = False<br />
End If<br />
<br />
End Sub
now i want to print the report without preview but i can't. because i dont know
anybody have idea that how can i print the report without preview using reportviewer
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
You know what would be really cool? Posting this in the Visual Basic/VB.NET forum instead.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Dave and I are going to have to disagree on this one. While he's right that Reporting Services are part of SQL Server, what you are trying to do has absolutely nothing to do with SQL. There's no query to fix, no database server connection to sort out.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
His original question was only on Reporting Services. Now he's gone and jumped back into the VB.NET relm.
|
|
|
|
|
How to pass NULL for the Image Datatype in SQL Server. For example we pass Null to int, string etc. Please tell me how is this possible for Image.
|
|
|
|
|
You can try using the System.DBNull class. It has a property Value which represents a NULL value in the database. It would be like that:
myDBVariable = DBNull.Value;
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
In a stored procedure I inserted the datas thro' parameters. In the parameter I have to insert the column name; I need to change the column name dynamically for each time in insert the value in the parameter so that I can sort various columns. I tried to use the below method but couldn't. Can anyone help me out.
create proc sortTable @column varchar(10),@direction varchar(5) as
declare @type varchar(5)
set @type = @direction
if @type = 'asc'
select * from tblname order by @column asc
else
select * from tblname order by @column desc
Regards,
LEE
|
|
|
|
|
You would need to turn your select statement into a string and then execute it, e.g.
declare @sql nvarchar(400)
set @sql = 'select * from tblname order by ' + @column + ' ' + @type
exec (@sql) I really don't like doing this, but if it's what you need to do...
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Im agree with Pete.
If the table dont have many columns you can make a SqL BY any Column whith different sort. But this no mantenible for futures develops.
I have to work with a lot dynamic sentences, i suggest dont use "*" and before you put this sentence into a procedure run execute plan to watch the behavior
|
|
|
|
|
Hi,
After my SELECT I have the following results (partially here):
ID Name ParentID
256 Language, Literature And Biography 2878
257 Language & Linguistics 256
258 Philosophy Of Language 257
261 Language Acquisition 260
267 Language Family Studies 263
289 Language Usage Guides 284
292 Language Teaching & Learning (other Than ELT) 256
293 Language Teaching Theory & Methods 292
294 Language Teaching & Learning Material & Coursework 292
(please excuse if this is not properly aligned)
I thought about using the dataset's Relations property, like:
ds.Relations.Add("NodeRelation", ds.Tables(0).Columns("ID"), ds.Tables(0).Columns("ParentID"))
..but I get errors if there is no link between and ID and ParentID. How else can I do this??
Please help.
Regards
ma se
|
|
|
|
|
Please explain. What exactly are you trying to do and what is not working? What is your select statement? We need more information to help you.
|
|
|
|
|
Hi,
I am developing an application using Visual studio 2005 and sqlEXPRESS 2005(both are installed in my machine). My problem is i can connect to sqlexpress via visual studio. I think it does not accept my connection string which is:
"Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword";
for myServerAddress if i wrote localhost\SQLEXPRESS C# doest not like the '\'.
If someone i have an idea ?
Thank you
|
|
|
|
|
try localhost\\SQLEXPRESS
I Love SQL
|
|
|
|
|
|
hi all
how many max connection to a database in sqlserver ??
|
|
|
|
|
Please make question more sensitive.
And try to make a google[^]search
I Love SQL
|
|
|
|
|
Hello,
32767 concurrent connections are allowed in SQL 2000.
Senthil S
Software Engineer
|
|
|
|