|
psvSource needs to be set to a DSN that you have registered in ODBC administrator. If you haven't specified one, that is probablky why you can't connect.
Database FAQ
|
|
|
|
|
Hi all
Please delight me how add store procedure file (*.sql) to my database.
Only way what i find out to add stored procedures is through Server Explorer window, but i yet had an file with ones (been generated third-part tool) and now i want to get acess to procedures which allocated in this file.
Thank.
|
|
|
|
|
Use Query Analyzer to run the script.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I'm using ASP on a IIS server, trying to connect to a MS Access 2000 database.
All is fine until I set a database password, and then IIS tells me "Not a valid password."
I've tried using "PWD=<password>" in the ConnectionString, but the PWD key is for a user password. I found something in the microsoft KB that suggested "DATABASE PWD=<password>" might be the answer, but, alas, IIS still replies "Not a valid password."
Has anyone faced this problem before? Anyone know how to overcome it? (Other than removing the db password)
Thanks in advance for any help.
|
|
|
|
|
|
Hi,
I have a problem, I need to move large numbers of data/multiple tables from a Mainframe DB/2 to a SQL server.
What is the best possible way?
Can I use VB.NET and dataadapers to do this? The larger tables consists of more than 25 milj. rows.
Happy to get any kind of help
Regards
JPalm
|
|
|
|
|
|
Hi,
In a disconnected dataset (dsAdressen) I have to search for a specific record. I want to do this with it's Primary Key (PK).
At designtime I created a connection (cn), dataadapter (daPersonen) and dataset (dsAdressen)
When loading the form I do the following
cn.open
daPersonen.Fill(dsAdressen)
cn.close
When I try to search for a specific record with it's primary key I use code like
dsAdressen.Personen.FindByPersoonsID(1)
When I show the found value in a messagebox it's showing the right record
MsgBox(dsAdressen.Personen.FindByPersoonsID(1).Voornaam)
but my textbox, for which I set the databindings property at designtime in the property pane (txtVoornaam=dsAdressen.Personen.Voornaam), does not show the found value. I thought that by setting this property my textbox should automatically show the found value in the dataset.
I can use code like this to show the value in the textbox, but I should say that is not the way
dim dr ad Datarow
dr = dsAdressen.personen.rows.find(1)
txtVoornaam.text = dr("Voornaam")
I do not understand
Thanks
Hendrik Jan
|
|
|
|
|
Try using a CurrencyManager
Dim cm as CurrencyManager = CType(Me.BindingContext(table), CurrencyManager)
table.DefaultView.Sort = "PrimaryKey"
cm.Position = table.DefaultView.Find(PK)
This should cause value in the selected row to display in the databound TextBox
Darrell A Escola, MCDBA, MCAD
|
|
|
|
|
Is someone know the way to generate Insert script of a couple of selected record in a databae ? To after execute to script on another databse/server ?
sebastien.lachance.blogspot.com
|
|
|
|
|
|
Sorry, I will try again. I have a Select statement that select some records. Then I want to send those record on another database. So I wanted to generate a Insert Script, that "Insert" those record.
My english is not so great, but I try to become better. Sorry.
sebastien.lachance.blogspot.com
|
|
|
|
|
|
Any tutorial/link on developing applications for Windows CE .NET using C#
|
|
|
|
|
I have a table with:
partId, location, quantity.
1 ,a ,12
1 ,b ,10
What is the query to make :
partId, quantity a, quantity b.
1 ,12 ,10
There are only two location, a and b.
Do you get it?
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Hi there. It depends on the database you're using. Here's one way in SQL Server:
select partId, sum(quantityA) as a, sum(quantityB) as b
from
(
select partId
,case (when location='a' then quantity else 0) as quantityA
,case (when location='b' then quantity else 0) as quantityB
from myTable
) x
group by partId
|
|
|
|
|
Thanks a lot
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Hi,I have a problem when I try to get resultset from a procedure.
if there is only select statement in my procedure,it works fine.
but if I add a insert statement in procedure,pRst->GetState() will return adStateClosed
develop environment:
vc6+MDAC2.7
sql server 2000
here is the procedure code:
create table tem(t_id int,t_date datetime)
go
insert tem select 1,dateadd(minute,1,getdate())
go
drop proc pTest
go
create proc pTest
as begin
--insert tem select 2,dateadd(minute,2,getdate()) --if I add this line,it won't work
select * from tem
end
go
here is the ado code:
_ConnectionPtr pConn;
_RecordsetPtr pRst;
_CommandPtr pCmd;
pConn.CreateInstance(__uuidof(Connection));
pCmd.CreateInstance(__uuidof(Command));
pRst.CreateInstance(__uuidof(Recordset));
....
try
{
pCmd->CommandText = "pTest";
pRst = pCmd->Execute(NULL,NULL,adCmdStoredProc);
//pRst = pConn->Execute("pTest",NULL,adCmdText);
//both of above return adStateClosed
}
catch (_com_error &e)
{
....
}
thanks
|
|
|
|
|
Can someone please explain what the SET NOBROWSETABLE off / on value does?
This setting doesn't appear in the Microsoft books online.
Thanks,
K
Kerry Johnson
Business Systems Consultant
|
|
|
|
|
See KB 275483[^]. At the end of the article, it describes SET NO_BROWSETABLE ON.
There's some information for the SQL Server 2005 Beta in KB 885146[^].
Basically, the option is there to support client-side cursors. After a certain amount of experience my recommendation would be to avoid client-side cursors and indeed updateable recordsets in any form. Use static, forward-only recordsets and explicit INSERT, UPDATE and DELETE commands instead.
Be aware that SQL Server only supports a single forward-only resultset at a time on a given connection. ADO fakes multiple active resultsets by creating another connection under the covers - if you're not aware of this you can end up deadlocking with yourself. Also note that the second connection is not part of the same transaction.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi,
I am trying to copy a record from an existing record in the database and then save it as a new record. The dataset I am using has a couple of references to child tables which have primary key info as well. Does anyone know an easy way to do a copy, get a new primary key information and set the primary keys on the copy to the new one?
Thanks.
|
|
|
|
|
I have a simple C# app that uses an OleDBDataAdapter on an Access database. One of the fields is a date/time. I insert a new row into the table and the date portion of the date/time is there but the time is always "00:00:00" (the time fields are set properly in the DateTime object when I look at it in the debugger)
I tried setting the schema to us DBTimestamp and get an exception thrown during the database update 'type mismatch on criteria query'
any ideas on what could be causing or what I need to do to get both the date and time portions of a DateTime to trasfer to a database?
thanks!
|
|
|
|
|
I had to set all my Access date formats (in the table designer) to 'General Date'. The format seems to dictate the output format. Other formats are not fully understood by the ODBC driver (guessing).
|
|
|
|
|
Is there a way to do a query on 2 differents DB ?
Please help !
|
|
|
|
|
You can do this if you use linked servers.
Affordable and reliable hosting? Click here!
|
|
|
|