|
There is top money to be earned, here and now! I will get straight to the point about this top money-earning program! You can earn top money by becoming as an Employ right now-for only 200$! No experience, no products to han...
http://alturl.com/fca9p
|
|
|
|
|
1) I use vs2010. I want to add a "LOCALE" database to my project. just local not in localserver. connecting vi binding a datagridview works. but connecting vi ado classes (sqlconnection) not work cause wrong connection string. I test many connectionstring even orginal connectionstring that binding use "4 ex: datasource:|datadirectory|\text.sdf" but wrong connection string error occur.
in vs 2008 I had no problem.
2) what kind of database is better to use in simple program: local? or in localhost? after publishig the program will use in another pc. is putting db in localhost is work then?
Thanks,
Sia swar
Baluch
|
|
|
|
|
This[^] site should help you get the right connection string.
siaswar wrote: what kind of database is better to use in simple program: local? or in localhost? after publishig the program will use in another pc. is putting db in localhost is work then?
It depends on how are you going to deploy the application. If the database resides on the client computer, local* should be fine. If the database is going be on another computer, connection string should be likewise. Make sure to configure database to allow remote connections (SQL server surface are coanfiguration will help doing that).
* I have no idea what you mean when you say "local or localhost".
|
|
|
|
|
siaswar wrote: in vs 2008 I had no problem.
You're using Sql Ce by the looks of it. There might be different versions[^] of the SqlCe driver on your system.
siaswar wrote: what kind of database is better to use in simple program: local? or in localhost?
Since SqlCe is serverless, I'm assuming that you're comparing SqlCe and SqlExpress. If you're just going to store some data that could have been in a text-file, go for SqlCe. If you need a real database, go for Express.
I are Troll
|
|
|
|
|
I have simple db with 4 tables: class, book, student and studentbook. studentbook has st_id and book_id as foreign keys and an extra field for result. book has some book for classes. I just insert new students. I'm quite beginner in db and don't know how to fill studentbook. should I fill it (just foreign keys) when filling student table? or it can be automatically? I don't know the routine. I should insert students and result in different times.
Extra information:
I use visual studio 2010 for programming and access 2003 for db. for user-friendly reason I want a datagridview that shows students and result in on table to insert result for each student. I got some success but it's not quite update but inserting action, that my insert two or more rows for a student in studentbook table cause clicking of updating button.
Please any idea or simple code?
Thanks,
Sia swar
Baluch
|
|
|
|
|
siaswar wrote: should I fill it (just foreign keys) when filling student table?
Your data model isn't clear.
I will presume that any one book can only be used by one class. Thus one book is associated with only one class. So your tables and fields would look like the following.
class: class_id, class_name
book: book_id, book_name, class_id
student: student_id, student_name
Students takes classes so there must be a way for a student to be associated to a class. So that gives another table.
student_class_link: student_id, class_id
For this table you would populate it as follows.
1. Create classes - fill class table.
2. Assign books to classes - fill in book table and include appropriate class id.
3. Create students - fill student table
4. Assign students to class - fill in student_class_link table. (It is NOT 'automatic' you must add the values.)
If I want to find what books are associated with which student I do NOT need another table. That is because I can use the following relationship to get the books.
student -> student_class_link -> class -> book
|
|
|
|
|
I don't use class in this manner. I mean grade for classes such class A is for student of 7 years old and class B is for student in age 8. student table has class_id field too. in this way one student can have every book of class like, math, english,... and each book belong to all student in class. so I create studentbook table which has book and student ID and an extra field: RESULT. well student table will be fill by a user of software. afther a long time he/she will import student result which goes in studentbook table.
question is how and when studentbook.st_id and studentbook.book_id should give value. suggest a query and when use the query, when importing the students or when want to import results?!
As you know it's my first database as homework.
Thanks,
Sia swar
Baluch
|
|
|
|
|
siaswar wrote: when want to import results?!
Your requirements are still not clear to me.
But regardless your "studentbook" table still represents a link table (two tables linked together.)
You fill it in when you have the necessary information to fill it in. Which, as best as I can figure, you would have when you assigned a student to a class. However if there is a 'check out book' process (a manual process perhaps done the first day of class) then it would be done then.
|
|
|
|
|
Hi,
AS the subject line states, currently it is being done by a third party company, they run scripts to do this. These scripts are set up to run every 3 minutes.
We are trying to rewrite this locally. Would SSIS be a way to handle this? Any other way?
if anyone could point in the right direction, also where to start with SSIS, I have used DTS Packages before. I opened SSIS and looks pretty overwhelming!
Thanks a lot!
|
|
|
|
|
SSIS is the way to go in my opinion. You can create a simple data task in a package and use a job to run it every 3 minutes.
|
|
|
|
|
vanikanc wrote: Any other way?
You could do it is a OS shell script. Just export from Oracle and import to SQL server, with some post processing via procs in SQL Server if needed.
Or write your own service of course. C#, Java, etc.
In the past I have not been impressed with SSIS error handling. But I am also very familiar with writing C#/Java database code so I am biased.
|
|
|
|
|
|
SSIS is the best choice for a tool candidate that will be used for data transfer
But you can create a SP and create a job with 3 minutes interval in each run
Within the SP you can connect to Oracle DB and transfer your data using stored procedure.
|
|
|
|
|
I wrote simple winform ( part of it with WPF ).
In the simple application i have some place that i get information from database ( from mdf file ).
The code ..
<br />
public SomeDBObject : System.Data.Linq.DataContext<br />
{<br />
... some code ...<br />
}<br />
<br />
List< SomeDBObject > listViewItem = null;<br />
try<br />
{<br />
listViewItem = new List< SomeDBObject >();<br />
<br />
using( DBDataContext dBDataContext = new DBDataContext( mdf_File_Path_String ) )<br />
{<br />
listViewItem.AddRange( from item in dBDataContext.dBs<br />
select ( SomeDBObject ) item );<br />
}<br />
}<br />
catch( Exception e )<br />
{<br />
... <br />
}<br />
now, on my machine and on some other machine all work fine.
But some on some other machine that i install ( clean machine ) my application i get exception from the line
using( DBDataContext dBDataContext = new DBDataContext( mdfFilePathString ) )
and the exception is about some problem with the sql on the machine.
The exception:
a database with the same name exists, or specified file cannot be opened, or it is located on unc share.
This is happaning with win7 and win Xp also.
I try to re-install the sql 2008 express - but this is not halping.
|
|
|
|
|
We're about to migrate from 2005 to 2008. Is there anything we should be aware of regarding sql code or anything functional that changed? Are we going to have to refactor our store procs and views to make them work?
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
It's been a couple of years, but it was pretty slick. There is an update advisor that notes code that is being depreciated. I'v heard that you should check with any third party software you have to make sure it will work with 2008--we did not have that issue. If changing servers, check orphaned logins.
|
|
|
|
|
I agree with leckey. The deprecated items can be a pain but not hard to change.
Do not forget to set options like xp_cmdshell if you use it.
|
|
|
|
|
Been down that road twice now and not had any problems - seems fairly easy with no gotchas either time.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
This was one of our simplest upgrades ever, there was no problem with deprecated code, smooth as cream.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello,
It is best practise to run Upgrade Advisor before starting an upgrade.
Please refer to SQL Server 2008 Upgrade Advisor download links.
I have done this upgrade a few times without any problem.
I hope it will be easy for your case also
|
|
|
|
|
Yes, you saw it right, SQL Server 7. Don't ask.
http://support.microsoft.com/kb/238822[^]
Does anyone have a copy of the RepRbld.exe file mentioned in item 3 in the above link?
Thanks
-Sean
----
Fire Nuts
|
|
|
|
|
Hello all,
Am trying to create a function in access to get records from an excel file from sheet1 save it to one table im access(both 2007) , .... , unbeleivable ... cant find any hint on the net .... all doing the opposite (exporting to excel) its driving crazy .....
any body can help???
Regards,,,,,
0 will always beats the 1.
|
|
|
|
|
Wow you really need some google foo. I see an overwhelming number of examples[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Man,
But honestly non of the search results gave a clear solution ...
my problem is ,or the missing link in my issue is how to make my defined objects to be the represent an excel sheet on my drive. ie:
Dim xapp
Dim xworkb
Dim xworks
Set xapp= CreateObject("Excel.Application") this will create an excel object which i dont need.
also
Set xapp= Excel.Application
Set xworkb= xapp.Workbooks.Open(1) this is wrong i think ??
how to set those variables to represent an excel sheet on C:\book1.xlsx so i can manipulate the data and transfer it to recordset then to my table .
Helpppp
0 will always beats the 1.
|
|
|
|
|
This looks like more of an Excel VBA question rather than a database question. You might get a better answer if you post on the Visual Basic forum, if you have not done so already.
|
|
|
|