|
Now i would like to display all the data in a Datagrid using:
Try
objConn.Open()
dg1.DataSource = objCmd.ExecuteReader()
dg1.DataBind()
objConn.Close()
Catch Err As Exception
ltlError.Text = Err.ToString()
Finally
objConn.Close()
End Try
but i only get the first column and not the 4 other. How come.
|
|
|
|
|
gharry wrote: but i only get the first column and not the 4 other. How come.
Not sure to tell you the truth, I dont know VB.NET. If I had to venture a guess thought the problem probally related to whats being pulled from the CVS file.
Create the DataReader and loop through it output the results to the debuger. Eliminate that as a posible cause.
My guess would be that when getting the data from the CVS file its not getting all of the rows / cols. Or there is a problem with the Columns in the CVS file. Hmm then again you might have to experiment with the datagrid itself. Is it expecting to recieve the data in the manor in which your providing it?
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
i have written a code to insert value below
------------------------------------------------------
Dim cmdselusers As SqlCommand
cmdselusers = New SqlCommand("insert into st(a,b,c) values @a,@b,@c)",con)
cmdselusers.Parameters.Add("@a", "ass")
cmdselusers.Parameters.Add("@b", 0)
cmdselusers.Parameters.Add("@c", "ss")
con.Open()
cmdselusers.ExecuteNonQuery()
con.Close()
-------------------------------------------------
but i get the following error
Prepared statement '(@a nvarchar(4000),@b bigint,@c nvarchar(4000))insert into st ' expects parameter @b, which was not supplied
wht may be the reason for tht
help?????????
|
|
|
|
|
You have a missing opening bracket after values
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I cant get import anything to my SQL DB. spISQLServer is working fine bec it has been tested. I cant figure it out why didnt it import? Did I forgot something to add? Please tell me bec I am so extremely frustrated!!
spITable = spIDatabase->Tables->Item("HoleDiameters");
spIBulkCopy.CreateInstance(__uuidof(BulkCopy));
spIBulkCopy->DataFilePath = L"C:\\tesss.XLS";
spIBulkCopy->DataFileType = SQLDMODataFile_TabDelimitedChar;
spIBulkCopy->ErrorFilePath = "c:\errores.log";
spIBulkCopy->RowDelimiter = "\n";
spIBulkCopy->MaximumErrorsBeforeAbort = 1000;
spIBulkCopy->ServerBCPDataFileType = SQLDMOBCPDataFile_Native;
spIBulkCopy->UseBulkCopyOption = true;
spIBulkCopy->IncludeIdentityValues = true;
//for import
spITable->ImportData(spIBulkCopy);
spISQLServer->Close();
|
|
|
|
|
I've just been posed a challenge: to update a DataGrid on one client when another client changes the source table for that grid on a central database, all three connected on a standard TCP/IP network.
Now I vaguely (probably incorrectly) remember something about earlier versions of ADO being able to detect changes in source data, but I may be senile already, so I said, "Yes, it's possible!"[1]
Assuming there is no built-in way to detect these changes, I envisage several possible extrinsic solutions:
1. When other clients update the row, inform them it has changed since they read it.
2. Have each client broadcast the table/row ID to all others when they change it.
3. Have the database broadcast the table/row ID top all clients when it changes.
The last two then involve interested clients fetching the current version of the row if necessary.
It all seems rather messy, but this is not an uncommon problem, so what do I do?
[1] It's not official work, so I'm allowed to do that.
The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
The solution depends upon how close you need to keep the synchronization. If 5-10 seconds is fine, you can just keep a TimeStamp on the rows. Every so often, send the client to request any rows that exceed it latest TimeStamp. It will usually return zero records and nothing needs to be done. This does require that rows be marked for deletion instead of physically deleted immediately.
The other solution I have used is to create a service and all clients access the data through it. It is then easy to send update notices down the socket to each client. I try to avoid this solution since it will complicate future maintenance.
|
|
|
|
|
Michael Potter wrote: The other solution I have used is to create a service and all clients access the data through it. It is then easy to send update notices down the socket to each client. I try to avoid this solution since it will complicate future maintenance.
Never mind complicating current development.
Thanks, I think I'll look into the first solution. I suppose I could get a separate DataSet of changed rows and merge it into the DataSet behind the display, no?
The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.
|
|
|
|
|
Can we insert a record directly into ms-access table using sql stored procedure?
could anyone help me.
|
|
|
|
|
Add the Access database to the SQL Server as a "Linked Server" then you should be able to write an update statement from a regular SQL statement.
"People who never make mistakes, never do anything."
My Blog
|
|
|
|
|
What do you want to do. Update MS-Access Database with the stored procedure of SQL server or have your own update stored procedure for MS-Access.
Akif
|
|
|
|
|
When attaching a database that was detached from another SQL Server instance.
I got the error message below:
Error 602: Could not find row in sysindexes for database ID 25, object ID 1,
index ID 1. Run DBCC CHECKTABLE on sysindexes.
how can i solve this problem. i am using SQL Server 2000
Thanks and Regards
|
|
|
|
|
check out this
http://databasejournal.com/features/mssql/article.php/2224361
|
|
|
|
|
I have read article "Making ATL OLE DB Provider templates support updating of data" at www.codeproject.com. Through reading your article, you must be a professional in "OLE DB Provider" field, I think so. Now, would you like to give me some help about this issue? You will be pretty appreciated.
1. In the file "IRowsetChangImpl.h" of your "Simple Data Object with update support", there is a row of code "HRESULT hr = pT->GetDataHelper(hAccessor, pColInfo, (void**)&pBinding, pDstData, cCols, spConvert, pRow);"(lies in method "SetDataHelper"). But there is not definition and implementation of "GetDataHelper". How to resolve it?
2. Now, I'm building up a updatable OLE DB Provider. This provider will be run in MS SQLServer DTS. First "Transform Data Task" of MS SQLServer DTS get the rowset from SQLServer, then call this provider, and pass rowset data to my provider by calling IRowsetChange::SetData(HROW hRow, HACCESSOR hAccessor, void* pSrcData). My questions are as following:
1) "Transform Data Task" pass the new data(a row of data include 10 columns) to my provider through method "SetData(HROW hRow, HACCESSOR hAccessor, void* pSrcData)". Is it correct?
2) I have get the DBBINDING info by the next code:
STDMETHOD (SetData)(HROW hRow, HACCESSOR hAccessor, void* pSrcData)
{
DBACCESSORFLAGS *pdwAccessorFlags;
DBCOUNTITEM *pcBindings;
DBBINDING **prgBindings;
DBBINDING *pBindings;
pdwAccessorFlags = (DBACCESSORFLAGS *)::calloc(1, sizeof(DBACCESSORFLAGS));
pcBindings = (DBCOUNTITEM *)::calloc(1, sizeof(DBCOUNTITEM));
pBindings = (DBBINDING *)::calloc(1, sizeof(DBBINDING));
prgBindings = &pBindings;
HRESULT hr = this->GetBindings(hAccessor, pdwAccessorFlags, pcBindings, prgBindings);
return S_OK;
}
Now, how can I extract data from pSrcData? I'm puzzled.
Expect for your reply!
Thanks in advance!
|
|
|
|
|
Hi All,
I am using SQL server 2000, one of my data base log file size has reached to the size of 30 gb. Even after transactional back up size did not decrease. Then I delete the log file and recreated it, still it is growing remarkably.
My datbase setting for Recovery Intreval is 0(zero) minutes.
Can anybody tell me why this file is increasing so fast?
Thanks for the help.
|
|
|
|
|
select itemlookupcode,extendeddescription from item where itemlookupcode = '14010006'
the extendeddesription data type is ntext
i get the error when executing the command
An error occurred while executing query:<br />
<br />
Page (1:735), slot 40 for text, ntext, or image node does not exist.
i cannot even execute the delete and update statement to amend this row, any1 can help me?
|
|
|
|
|
|
no...
i upgraded to SQL 2000 SP 4, the problem still occur...
|
|
|
|
|
Well then, here's another possibility:
http://support.microsoft.com/kb/890755[^]
Incidentally, I have found these by Googling for the following:
Page slot for text, ntext, or image node does not exist.
so if the technote doesn't apply for you, you may want to Google the above phrase yourself and see what you can get.
|
|
|
|
|
try by converting column extendeddescription into varchar
select itemlookupcode,Convert(varchar,extendeddescription) as description from item where itemlookupcode = '14010006'
|
|
|
|
|
Albanian wrote: try by converting column extendeddescription into varchar
select itemlookupcode,Convert(varchar,extendeddescription) as description from item where itemlookupcode = '14010006'
Still cannot solve the problem, below is the Error Return by Query Analyzer:
<br />
Server: Msg 7105, Level 22, State 6, Line 1<br />
Page (1:26314), slot 66 for text, ntext, or image node does not exist.<br />
<br />
Connection Broken
Any1 can help me please??
|
|
|
|
|
Framework 1.1Access 2003 DB WEBFORM
I'm Trying to generate to Dataset some detail using adapter and OLEDbconnection
but i have strenge error Message IErrorInfo.GetDescription fail with E_FAIL(0X80004005).
the Query is very simple something like that
select * from found
i did every thing with qureybuilder etc...
Do have any idea what is the Problem?
|
|
|
|
|
How do I create new records in a table which contains multiple foreign keys using a DataSet?
|
|
|
|
|
hai this is bikshamaiah i am the new friend of ur group
please give me windows services programing give me the ex programing
bikshamaiah.g
|
|
|
|
|
bikshamaiah.g wrote: please give me windows services programing give me the ex programing
What does that mean?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|