|
Hello all
I am making a client server application in which client will call system calls and send the information to server in VC++.
I want to store that information into database e.g Access using ADO( in VC++).
Plz guide me what should i do?
Do i have to do serialization of data?
e.g From client i have to send the the computer name and user name to server. how will i do this ?
how will i serialize data?
how will i use ADO? I am newbie plz be aptient with me and also tell me examples as well
Thanks a lot
|
|
|
|
|
Hello,
I have a problem building a query.
There is a Master table with fields.
ItemID[int][PK] Description1[text] Description2 [text]
1 "Any desc" "Any Desc"
2 " " " "
and then there is a child table.
ID[int] ItemID[int] CustomerID[int]
1 1 546
2 1 546
3 1 534
4 2 545
the two table are inner-joined with ItemID.
I want to getthe data from two, but The Items selected should't repeat i.e. should be grouped by ItemID.
I have problems in this bec Description fields are text in this case.
So can anyone help me in this ?
Looking forward to hearing from you.
The problem is that i want to get just the
Regards,
Asim
|
|
|
|
|
I don't know that I understand you correctly. You want to INNER JOIN the master and child table, but you don't want to repeat the ItemID (the join column) because it will return duplicate text columns? I am somewhat curious as to what format you want the data in. Performing joins tends to produce denormalised output and you cannot really get away from that.
The best way that I can think of is to do two queries, one to join the tables but not return the text columns, and another to return just the text columns.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Hi, I have create one database in sql server. In the database I create one table that have the field and appropriate datatype. But when I detach the database from the sql server and change the location of the data file, and reattach it agian to the database. All the field datatype become to char datatype with lenght of 10. I don't understand why it become like that? Dose anyone have any idea about that? And how to recover it to the orriginal table that make all field have the previous datatype???
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
What's the field type in the first place? Are you using SQL 2000?
|
|
|
|
|
Albert Pascual wrote:
Are you using SQL 2000?
Yes
Albert Pascual wrote:
What's the field type in the first place?
There are around 200 fields in my table. And during the time that I create the all field set to char with 10 lengh. And after that I try to change each data type of the field to match my requirement for my application. Some field contain bit , smallint , smalldatetime , nvachar ... But the first field is nvachar with 15 lengh. I'm sure that before I close the table i also save to the change that i have made to my table. Then I start to detach the database from SQL server then move the source file to other destination of my computer but still in the same drive C: . Then I start to Attach the database to SQL server, but when I open the table I found that all the field data type in the table become to char with 10 lengh. I don't understand about this change, Do you have any idea about that???
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi,
I'm using an inner datagrid(Master\details), with item template columns.Its getting the data from the database. In that i've a column enterddate in which i'm getting the date in the format 12/26/2005 12:00:00 a.m by default. want to remove this 12:00:00 thing but not able to get it. have tried using the DataFormatString={0 } in the html part but not wrking out. kindly let me know if ny answers to this.
Thanks a lot,
Manasi
|
|
|
|
|
Does anyone have any experience with these? What are some best practices for using them? We're using them at work, but I've never seen anyone use them before. Does Microsoft have any good documentation on this?
Thanks,
Will
|
|
|
|
|
What is these that you are referring to?
bravo659
|
|
|
|
|
Hi,
I have just installed MS SQL 2005 Express for testing purpose but a unabe t gn.. what user id and passwrd should use?
Many Thanks,
Jassim Rahma
|
|
|
|
|
Isn't username sa, password blank the default ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Can you create a liked server in the MSDE version of SQL Server?
If so, are there any limitations linking to a MS Access database?
Thanks,
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
hi can you tel me how to use the sessions in asp.net. see i have diff users. depending on the user i want to view the data using his code
|
|
|
|
|
|
Hi,
For using session, you can first add some kind of id e.g userid or something to the session and then retrieve the id from the session and depending on user id get the data.
e.g.
to add id to session,
string sUserID=session.add["UserId",userid];
and to retrieve id from the session,
string sUserId = Session["sUserID"].ToString();
all the best,
manasi
|
|
|
|
|
how can i use ping command in ASP.NET??????
|
|
|
|
|
|
To simplify our own situation lets say we have clear seperation of the three layers with the Presentation, Business and Data Access Layers in their own seperate DLLs, but on the same client machine. Our DAL DLL is obfuscated and holds our single service account to access the database.
We are presuming it is at least very difficult even with someone having access to the obfuscated DLL they would have a difficult time determining the userid and password of our one service account that can access our SQL Server database. Still, how do we stop someone from writing their own code and directly accessing the DAL DLL to change our datbase?
We considered sending a hidden key between the layers of the obfuscated DLLs, and even possibly adding an extra layer of encryption using Public and Private keys. Still, every single time a database access is requested would require this key encryption and decryption when 99.9999% of the time it is unnecessary. Is there a quicker and cleaner way of doing this?
Thanks!
|
|
|
|
|
Hello,
I have been trying to figure out how to get some additional information into a
report on an ASP page but I am stuck. The report asks the user for a date
range. There is also a field to input the UserID to narrow down the search.
So if I would like a report on information for the previous month I would just
input the dates. If I just wanted the report for the particular UserID then I
would add info to that field.
What I am trying to do is modify the record set so that the report will display
another column in a different tables within the database. I have not been
successful yet. I am not sure how to go about this since the recordset is using
a string, not a SELECT statement.
Here is the select statement:
'Prepare and open recordset
GetConn dbconn
Set rs = server.createobject("adodb.recordset")
rs.activeconnection=dbconn
rs.source = strSP
rs.open
If I change the source from strSP(the string) to a normal join statement for
the two tables then the information on the page is not correct. Is there any
way to combine the string and a select statement?
I've searched all over the internet and books for examples but I have not found
any. If anybody has any ideas let me know.
Thank You!
|
|
|
|
|
I figured it out. The string was calling a stored procedure. once I figured out what stored procedure was the source I was able to add the data.
|
|
|
|
|
Hi
I am using ADO on Win98, When i am trying to use insert/select sql statements I am getting CryptApI,CryptoAcqire failed eroor, can any one help me
Gourigari Ramesh Reddy
Hyderabad
|
|
|
|
|
Hi,
I connect to an oracle database using OleDbConnection and run quite a number of queries. In the connection string I use everything default, that means the min pool size is 0, max pool size is 100 etc. I don't keep any connection open, as soon as I finish one query I will close the connection and do something else. Also, this is not a multi-thread program.
The problem I have now is that I found my program will create more than one sessions in Oracle, the highest number of sessions I found so far is 24, the lowest is 2. I don't know why. Can anyone explain it a little bit and tell me what is the relationship with connection, connection pooling and the actual session in database?
Thanks in advance.
|
|
|
|
|
I am trying to update an ISequentialStream object in a RowSet. But am getting the following errors:
- Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
- String data, length mismatch
The "String data, length mismatch" one is troubling me. And I think it has something to do with the way I am creating the stream. This is the methodology I am trying to implement:
IStream *pIStream;
CreateStreamOnHGlobal(NULL, true, &pIStream);
pIStream->SetSize(x);
pIStream->Write(databuf, databuf_len, &byteswritten);
ISequentialStream *pISeqStream;
pIStream->QueryInterface(IID_ISequentialStream, (void **)&pISeqStream);
I am struggling with the length. As to what it should be set to. I have done a simple test to try and write a 6 character string. The size of the stream created is 6 bytes and I have set the size of the length in the bindings for the rowset to be 6. Yet I am getting a string length error on Update ...does a null terminator for the string have to be allowed for somewhere.
Any help on what I may be doing wrong here would be appreciated. Thanks.
|
|
|
|
|
If I do an GlobalAlloc and copy the data into this block of memory and pass that to the CreateStreamOnHGlobal function instead of using the IStream->Write function it works without an error.
But as far as I can tell, the size of the streams created using both methods are the same, and the memory allocated to each is the same.
|
|
|
|
|
I'm working on a project where i have a parent child relation between two tables. just straight forward. I use the Win form DataGrid in .NET c# to view the data. The relation is made and a + appears before the key in my datagrid. When i click that + i can click on a label which brings me to the child records. The parent row is then showed as a header.
What i would want is when i click the + that child records appear under the parent record in the current datagrid. Simular the way access shows related records.
Can this be done with the datagrid in a window application ??
|
|
|
|