|
|
But my problem not solve "OriginalGriff"
he said talk to database administrator
therefor i message you. Who is solve my problem.
This is database issue you can check this.
|
|
|
|
|
Computechsoft wrote: This is database issue you can check this. Have you talked to your Database administrator? Have you checked that you are using the correct username and password for the database? These are not things that we can check for you.
I notice that you also posted the same problem at https://www.codeproject.com/Questions/1261063/Run-time-from-VB-NET-no-error[^], so it is clear that you are asking the wrong people.
|
|
|
|
|
This is connectionString (username and password) it is correct.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="RMS.My.MySettings.StupConnection" connectionString="Data Source=System-PC\SQLEXPRESS;Initial Catalog=Master;User ID=Administrator;Password=Admin" />
</connectionStrings>
</configuration>
|
|
|
|
|
"Cannot open database "COLORS". User login failed for user "Administrator""
This message is telling you that the login detail are incorrect. As stated a number of times already, we cannot help with this. You need to check the settings in your database system.
|
|
|
|
|
Which was itself a repost of: Run time from VB.NET (no error)[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Try to connect your database using DB with same login. If you're getting the same error message, it's clear that you're fighting with wrong login info. So just confirm with your DB Team/administrator regarding the login info. First ensure that you're able to database using DBTool(Ex: SQL or Oracle) & then try your code.
Agree with Richard. Don't post same (duplicate) questions in multiple forums. Just wait for sometime to get more answers from more volunteers.
|
|
|
|
|
I Developed the program that retrieve the content from Database and store it in the List
List<Student> studentList=session.createQuery("from Student s where s.lastName=:lastName and s.firstName=:firstName")
.setString("lastName",lname)
.setString("firstName",fname).list();
for(Student studentinfo:studentList)
{
System.out.println(studentinfo);
}
model.addAttribute("result",studentList);
And i have passed the result to the JSP File
${result}
<c:forEach var="item" items="${result}">
${item}
</c:forEach>
I am getting the result like this
"Student{id=6, firstName='arul', lastName='suju', address='s;lda'}"
But i want print the value one by one,Can any one suggest better code in JSP
|
|
|
|
|
I store a secret as byte[] in MongoDB, and went to decrypt and it failed.
so In my .Net class I used byte[].
"Secret" : { "$binary" : "o2lBkODfRqw=", "$type" : "00" },
What would be the correct way?
string? to Base64 and back
on a side note, I used Bson Date format to store a date, but in TypeScript can't pull the time offset from it.
Should I just dump the Bson decorator and just use Date?
Or just test and see if it works.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
My Bad, I can store a byte[] in MongoDB.
I had changed the secret by mistake on login.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Glad you got it sorted. How's Mongo been treating you?
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
So far so good. I really like it.
Finally got use to the ObjectId and my models are matching up in .Net Core and Angular. The Net Core Mongo drivers are pretty cool, but a whole different beast. MongoDB is fine for my portfolio website and a good learning experience.
Got praise last night at the Agile meetup for taking the time to learn it. So it be a valuable tool or experience.
I’m in Vegas for the weekend, won $50 so far.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Hi,
I have a SQL Server database with some views. If I wanted to create a new view based on a current view what is the process please? Is their issues with interrogating the same table from two views?
Thanks in advance
|
|
|
|
|
Treat the view as just another table, you can have multiple joins to the same table/view in any view.
Where there may be an issue is when you self reference via a chain of joins but MSSQL will tell you when you try and run the query.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Dear All,
rs3=st.executeQuery("select * from "+sdata[j]+" where Username='"+idata[i]+"'");
while(rs3.next())
{
%><td><%out.println(rs3.getString("Final_Grade"));%></td><%
}
In the above JSP Code,sdata[j] is the array of table names and idata[i] is the array of usernames. what i am trying to achieve is, to retrieve final_grade from the tables sdata[j] with the username==idata[i] . Since the username is existing in some table it displays the final grade, but when no record found in the table i want print it as "Null" instead of Final_Grade . Is this possible to implement?
|
|
|
|
|
|
Just count the returned rows:
int count = 0;
while (rs3.next())
{
count++;
}
if (count == 0)
{
%><td>Null</td><%
}
|
|
|
|
|
I'll admit I'm terrible at database planning or design, architecture.
I finally got my Angular 6 working, folders and files set, navbars and footers and I'm on seeding MongoDB.
In EF DAL, I was never able to figure out how to make relationships. Another topic later in the future.
But in MongoDB it looks pretty easy.
Past I would create a table called Countries and another table called states, and use a join to link them.
In MongoDB, I can add a field called states.
Should I proceed in the using country model and add the states to that.
Or populate the states separately, and use the country ID's to link them?
I'm looking for best practice here, and perhaps NoSQL is different than SQL in terms of planning and design.
I'm not sure what the future holds for me here, in terms of actually using Countries and States in drop downs.
public class WEBSITE_COUNTRIES
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public ObjectId InternalId { get; set; }
public string Id { get; set; }
public string LongName { get; set; }
public string ShortName { get; set; }
public bool Enabled { get; set; }
public WEBSITE_STATES States { get; set; }
}
public class WEBSITE_STATES
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public ObjectId InternalId { get; set; }
public string StateId { get; set; }
public string CountryCodee { get; set; }
public string LongName { get; set; }
public string ShortName { get; set; }
public bool Enabled { get; set; }
}
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
States should have a reference to country.
I would suggest that you reverse the meaning of 'InternalId' and 'Id'.
Most tables will have an 'Id' (what you are calling 'InternalId') but will not have the other.
You should call your current 'Id' something like 'DisplayId'.
|
|
|
|
|
I'll fly with this first and give it a try
public class WEBSITE_COUNTRIES
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public ObjectId Id { get; set; }
public string DisplayId { get; set; }
public string LongName { get; set; }
public string ShortName { get; set; }
public bool Enabled { get; set; }
public WEBSITE_STATES States { get; set; }
}
public class WEBSITE_STATES
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public ObjectId DisplayId { get; set; }
public string CountryId { get; set; }
public string CountryCode { get; set; }
public string LongName { get; set; }
public string ShortName { get; set; }
public bool Enabled { get; set; }
}
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
Your state table should have 'Id'
|
|
|
|
|
Disclaimer: I have only played around with MongoDB for fun. No real application experience yet.
One of the things I had read about a document based DB is to identify the aggregate. An aggregate will be a complete record. In your case, country on its own is not complete as it needs states as well. So, I would have a single document with something like this:
{
"_id": "DB generated Id",
"Name": "Country Name",
"States": [{
"Name": "State 1"
}, {
"Name": "State 2"
}]
}
Now, if states on themselves are a complete record, then another document to hold state list can be used. This will lead to duplication which is absolutely fine AFAIK in NoSQL World.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
OK. I'll see what happens after I seed the data and start consuming it.
Will let you know.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
lw@zi wrote: country on its own is not complete as it needs states as well.
Rather certain that when I do a drop down for country it doesn't need states.
Something like an address page of course needs both country and state but it probably needs other things as well.
lw@zi wrote: Now, if states on themselves are a complete record, then another document to hold state list can be used. This will lead to duplication which is absolutely fin
Doesn't sound like a good idea to me.
Mongo already supports references. So if one wants a reference in country they can do that without hacking it themselves.
|
|
|
|
|
Disclaimer: this approach is rooted in Domain Driven Design, which is a common approach to NoSQL structuring. This is a super-rough look at entities vs value types in DDD.
I'm generally in agreement with @lw@zi, but it depends on your use case of states. If a data structure needs to be a domain-level entity, or is going to be directly referenced by multiple domain models, then it should have it's own store; otherwise it should be nested in a parent; it really has nothing to do with how much data is being tracked by an individual data structure.
If you will only ever present states in conjunction with countries, such as form fields and address resolution, without additional selection vectors then there is no reason to make it a reference and give it its own table.
If states are important on their own in the domain model or if multiple vectors might be used to access the data, such as if you have references to specific state agencies (NY DMV vs NC DMV, etc.), then you should make it a reference.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|