|
SELECT @XMLDOC.value('count(/DATAMATRIX/FSDATAMATRIX[FIELD1=sql:variable("@XCOUNTRY")])','int')
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
Perfect.
My data load project is now complete. I could not have done it without your help.
Thanks again.
David
|
|
|
|
|
You're welcome
So... what's the next project about?
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.
|
|
|
|
|
If user want to access database tables, view customized web report, please try http://www.finereport.com/, which is a free pure Java web app/report tool.
Excel like workbook to bind various element ( data filed, chart, links, etc), and set cell relation and format. Each cell can be set as form field, so user changes can be submitted to database.
No more coding, just drag and draw on template design.
|
|
|
|
|
hi all,
i use following statement to enumerate all SQL server instance
Dim instance As System.Data.Sql.SqlDataSourceEnumerator = System.Data.Sql.SqlDataSourceEnumerator.Instance()<br />
Dim table1 As System.Data.DataTable = instance.GetDataSources()<br />
For Each row As DataRow In table1.Rows<br />
cboServer.Items.Add(row.Item(0).ToString)<br />
Next
above code works well. but when i select any server from Combo box "CboServer" and write following statement, then error occur
Dim MainServer As Server = New Server(cboServer.Text.Trim & "\SQLEXPRESS")<br />
If MainServer.Databases.Contains("MyDB") Then<br />
mdChecking.PublicServerName = ServerName<br />
frmLogin.Show()<br />
Me.Close()<br />
Else<br />
some code<br />
End If
following line give error "Failed to connect to seerver
MainServer.Databases.Contains("MyDB")
i does not understand that when it enumerate the server then what is the problem to connect to this server.
any body can suggest me that how can i resolve this error ?
|
|
|
|
|
Try doing it without & "\SQLEXPRESS" in the Server object.
|
|
|
|
|
You ought to login into the server before you can check for the existence of a database on it. Connect to the server first.
|
|
|
|
|
can you provide code snippet, which help me to connect to the server
|
|
|
|
|
Hi,
I have a 3 tables, namely ProductBase, ProductA, and a ProductB. The ProductBase table has all the common fields, and ProductA and ProductB tables have fields on specific to ProductA and ProductB.
I have to create a dataset xsd file in Visual Studio 2005 that incorporates the above. This has to work for the insert, delete, update, and queries.
Please can someone help advise me on what to do? I have worked with basic .xsd files.
Thanks
Brendan
|
|
|
|
|
Is it a must to create .xsd files with VS ?
ok, After you have created that .xsd file , you want to CRUD, if you know how to Query ,Update,Delete i shouldnt be a problem.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,
I may miss the point now, but first you add a dataset to your project using menu Project/Add New Item... Then select DataSet.
After that you should have a visual designer where you:
- add the tables you need (from toolbox or server explorer)
- add the columns for each table
- add the keys
- add the relations
After this you have a full xsd which has implementation for all typical operations for all of the tables and the dataset.
Mika
|
|
|
|
|
Thanks for the reply. I have to update multiple tables, namely Product and ProductA, just not sure how to do this.
|
|
|
|
|
I'm afraid that this is not what you're asking, but after you have created the xsd, you should be able to instantiate ProductA and ProductB datatables directly from your code and apply Delete, Insert, Update and Select methods.
If you need more info, could you post a brief info/code about what you have already done and where is the exact problem.
Mika
|
|
|
|
|
Hi All;
i have colum with identity
here is an example
column
1
2
3
when i delete the row 3 and create new row sql create row with no 4
and i want the sql add the row with no 3
wht can i do ?
thanks in advice
Kareem Elhosseny
|
|
|
|
|
You can't without resetting the seed. If you think about it, say you had 25 records and you deleted records 3, 5 and 10. When you come to insert you are all over the place. Autoincrement/identity columns are meant to just be used. If do not want gaps then you need to implement your own code to do it.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
thanks alot for your advice
u r right
but my case is delete the last row only is there a solution
is the property "NOT FOR REPLICATION" usefull in my case
thanks again for your time
Kareem Elhosseny
|
|
|
|
|
S.A brother
if u have to delete last row from taable then use this query
<br />
declare @rownum as int<br />
set @rownum =(select max(id)-1 from tablename)<br />
dbcc checkident (tablename,reseed,@rownum)
for more ask again.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
|
You are welcome always.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Hello,
I am using a cross tab query which works fine for acccess but doesnot work for SQL Server I ahve version 5 Is there version issue ?
Also I wanted to make a table from the cross tab query w do I do it
Pritha
|
|
|
|
|
Sorry to post it twice .My network is not working properly
|
|
|
|
|
Well, if you posted the code maybe someone could help.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello,
Thanks
The following query works but the result doesn't get transferred in a table
Select Cap orderby JobWorker pivot TimePeriod into CrossTabCap
Regards
Pritha
|
|
|
|
|
Have a look at some of these, it should become clearer
Pivot
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello,
i have written a cross tab query which works fine with access but des not work with SQL server.Is there the version problem since i have ver 5?
Also how do I make table from the cross tab query.The into statement des not work.
Pritha
|
|
|
|