|
Thanks for the response.
At the moment, I've just done it as a string with delimiters (commas and full-stops). Is there any disadvantages of doing it this way? Are there any advantages of using an XML document?
|
|
|
|
|
The advantages are just that the documents form is in a sensible format, that is to say, the XML parser is able to tell what's data and what's metadata. If you pass in a comma or full stop in your data, you could have problems.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
HI
I WANT TO GATHER ALL INFORMATION @ TABLENAMES, PARMETER, PARAMETER VALUE,
CHILD PROCEDURES OF STORED PROCEDURES WHEN THAT SP CALL IN APLLICATION
|
|
|
|
|
|
I have create a diagram is between two table name "Truck" and "Contractor"
Primary Key table is contractor - ID
Foreign Key table is Truck -contractorID
I have check the check box(check the existing data on creation and Enforce the relationship for replication)
And uncheck the check box(Enforce the relationship for update and delete)
But when i go to my "Contractor" Table
I still can delete my data....
What i want is ....
I cannot Delete a record from the primary-key table if there is and matching foreign-key record.
What i should do to control it .....
Cheer Up (^_^)
|
|
|
|
|
Hi all!
Please help. I have a table in MS SQL database say persons with information of persons stored in one row, now I want the information of all the persons in different row:
p1_dob P1_age P1_sex p2_dob P2_age P2_sex p3_dob P3_age P3_sex
2000 05 M 1974 31 F 2001 04 M
to be:
p dob age sex
1 2000 05 M
2 1974 31 F
3 2001 04 M
______________
Please write me an sql stored procedure to transpose that kind of data.
Thank you.
phokojoe
|
|
|
|
|
|
Hi Colin
Thank you, it has worked. But one more question, What must I write so that I insert the newly transposed table contents into a new table.
phokojoe
|
|
|
|
|
|
Hi all!
Please help. I have a table in MS SQL database say persons with information of persons stored in one row, now I want the information of all the persons in different row:
p1_dob P1_age P1_sex p2_dob P2_age P2_sex p3_dob P3_age P3_sex
2000 05 M 1974 31 F 2001 04 M
to be:
p dob age sex
1 2000 05 M
2 1974 31 F
2 2001 04 M
______________
Please write me an sql stored procedure to transpose that kind of data.
Thank you.
phokojoe
|
|
|
|
|
I try to open een mssql database using using visual web.
When i import a table to a page for viewing and then running the page in a browser i get a parser error:
Parser Error Message: Unrecognized configuration section 'connectionStrings'
And the partrt of web.config that visual web writes looks like this:
Line 1: <configuration>
Line 2: <connectionstrings>
Line 3: <add name="KiddinSysConnectionString1" connectionstring="Data Source=EIBERGEN01;Initial Catalog=KiddinSys;Integrated Security=True"
line="" 4:="" providername="System.Data.SqlClient">
And nomatter what i do i cant get it wright and working. Is there something i forgot to decleare but i think that visualweb schould ha\ndle this.
Thanks for any help
Harry
|
|
|
|
|
gharryh wrote:
Unrecognized configuration section 'connectionStrings'
gharryh wrote:
providerName="System.Data.SqlClient" />
Did you forget to check 'Do not treat <'s as HTML tags' ???
Either way, it seems your config file is wrong. Start with a hard coded connection string, then when that works, read up on how to add stuff to your config file in MSDN, and do that seperately. Then you can solve one problem at a time.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I am a newbie to asp.net and havo to write a simple webpage to connect to a mssql database on a iis machine. I am used to wrok with php and mysql and having no problems of connecting to a database in that enviroment, but cant get it wright in the mssql and iis (aspx).
Any simple help with html code would be welcome.
Harry
|
|
|
|
|
Have this at the top of your page
<%@ import Namespace="System.Data.SqlClient" %>
<%@ import Namespace="System.Data" %>
Then either in your script block or your code-behind, use something along the lines of:
Dim objConn As New SqlClient.SqlConnection
objConn.ConnectionString = "data source=SERVERNAME;initial catalog=DATABASENAME;uid=USERNAME;pwd=PASSWORD"
objConn.Open()
cheers
Phil
|
|
|
|
|
The only solution i had was reinstallinn MSSQL server on de dev. machine and from that moment on it works like a good machine.
After building the application i tryed to transfer it to the production server running the same software and with the same rights and users and it wont work.
I now wil try to reinstall MSSQL on the production server tomorrow and i hope the problems wil be solved once againg.
But the question is still there, why is this happening.
|
|
|
|
|
How can we save a paragraph (having Unicode characters, multi-lines)from Windows Forms or Web Forms into SQL Server and then retake it to Forms without changed. Please help! I really need it.
Thanks!
|
|
|
|
|
|
Thanks, i'll try it. I think i'm having a slight problem with my unicode typing program too.
Thanks a lot
|
|
|
|
|
when writing to the database use:
insert into table(field)
values(N'bleh')
The N indicates unicode...
|
|
|
|
|
Hi,
I have a C++ application (MSVC6) that uses ADO - in fact just ported it from DAO to ADO. It works fine in Win2K and WinXP computers but is failing in a Win98 computer - the code is the same.
The problem is seen in a _RecordsetPtr Open command which fails with an Invalid Pointer error - the only pointer passed in the call is the _ConectionPtr which is opened in a call before. (Actually I am using the wrapper classes by Carlos Antollini, and have also posted this there). This happens in a computer with Win98 (which is located far away and I do not have access other than asking the user to do/try something). Any clues as to why only Win98? and not the other OS's. The failure happens the first time I do the Open call - which leads me to suspect something about the environment. I was able to open the database itself by an Open call to the _ConnectionPtr & in fact retrieved the property of the JetEngine version of the database (I need to make sure that they have equivalent of Access2000). So it is the _RecordsetPtr Open that seems to be the problem.
Any clues?
|
|
|
|
|
Hello all,
I created an index unique constraint in table in the database but i cant update the colume with this unique key constrint how can i do that.
Thanks
Hay
|
|
|
|
|
Make sure that you chose the correct column.
Ensure that the index is there
sp_help tablename
|
|
|
|
|
How can I see messages sent from SQL using ADO? In any quire analyzer I can see messages sent back from the db ie:
“Select * from authors” returns the following message “(23 row(s) affected)”
I need a way to programmatically trap and display the messages to the user. I know that Print statements are stored as error 0 and I can get those.
Ronald Hahn, CNT - Computer Engineering Technologist
New Technologies Analyst
HahnTech Affiliated With Code Constructors
Edmonton, Alberta, Canada
Email: rhahn82@telus.net
|
|
|
|
|
ADO or ADO.Net? Either way, the message "(23 row(s) affected)" is not sent back to the client; query analyzer makes that message. If you are using a datareader, then you can get the number of rows affected through the RecordsAffected property; in this case it would return 23, and you could show that to the client any way you want. If you are calling a stored procedure containing the SET NOCOUNT ON option, it will not return the row affected (I think it will always report 0, but I'm not sure).
|
|
|
|
|
So does the analyzer that is running the query generate all messages. How can I as a programmer know if a query actually went through?
set @Execstr = '[PUBS].[dbo].['+@table_name+']'
dbcc dbreindex ( @Execstr )
This code returns in query analyzer:
“DBCC execution completed. If DBCC printed error messages, contact your system administrator.”
How can I catch that?
|
|
|
|